Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-20, 10:49:51

Author Topic: Error when Browsing SSL Site  (Read 4990 times)

0 Members and 1 Guest are viewing this topic.

Offline letux

  • Valuable Member
  • *
  • Posts: 131
  • Karma: +0/-0
    • View Profile
Error when Browsing SSL Site
« on: 2016-11-10, 23:34:31 »
Hello Mostafa,
thanks for all above support ..
i'am using Apache with NginX-Proxy, and Let's encryption SSL .
on Web Features when i select " Front End " the SSL working Probably but even use "Back End" i got an issue on browsing
'The page isn’t redirecting properly'

after some search i fiend this topic https://forum.mratwork.com/kloxo-mr-tips-and-tricks/php-force-redirect-ssl-nginxproxy-endless-loop/

i don't know if this resolve issue but also i can't try it CUZ i can't fiend " /home/nginx/conf/globals " ..

what your opinion about it ?

Code: [Select]
# sh /script/sysinfo
A. Control Panel:               
   - Kloxo-MR: 7.0.0.b-2016100902
   - Web: hiawatha-10.4.0-f.1.mr.el6.x86_64
   - PHP: php54s-5.4.45-1.ius.el6 (fpm mode)
B. Plateform:
   - OS: CentOS release 6.8 (Final) x86_64
   - Hostname: mogardfkra.com
C. Services:
   1. MySQL: MariaDB-server-10.0.28-1.el6.x86_64
   2. PHP:
      - Installed:
        - Branch: php56w-cli-5.6.27-1.w6.x86_64
        - Multiple:
          * php52m-5.2.17-102.mr.el6
          * php53m-5.3.29-1.ius.el6
          * php54m-5.4.45-1.ius.el6
          * php55m-5.5.38-1.ius.el6
          * php56m-5.6.27-1.ius.el6
          * php70m-7.0.12-1.w6
      - Used: php56m-fpm
      - Multiple: disable
   3. Web Used: nginxproxy
     - Hiawatha: hiawatha-10.4.0-f.1.mr.el6.x86_64
     - Lighttpd: lighttpd-1.4.41-2.el6.x86_64
     - Nginx: nginx-1.11.5-1.el6.ngx.x86_64
     - Apache: httpd24u-2.4.23-2.ius.el6.x86_64
       - PHP Type: php-fpm_event
       - Secondary PHP: on
   4. WebCache: none
     - ATS: --uninstalled--
     - Squid: --uninstalled--
     - Varnish: --uninstalled--
   5. Dns: bind
     - Bind: bind-9.9.7-1.mr.el6.x86_64
     - DJBDns: --uninstalled--
     - NSD: --uninstalled--
     - PowerDNS: --uninstalled--
     - Yadifa: --uninstalled--
   6. Mail: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
      - pop3/imap4: courier-imap-toaster-4.1.2-1.3.20.mr.el6.x86_64
      - smtp: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
      - spam: --uninstalled--
   7. Stats: webalizer
D. Memory:
                total       used       free     shared    buffers     cached
   Mem:          3959       3262        697          2        577       1021
   -/+ buffers/cache:       1663       2296
   Swap:            0          0          0
E. Disk Space:
   Filesystem      Size  Used Avail Use% Mounted on
   /dev/vda1        59G   21G   36G  38% /

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Error when Browsing SSL Site
« Reply #1 on: 2016-11-11, 07:24:17 »
If using letsencrypt, don't set redirect (including in .htaccess).
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline letux

  • Valuable Member
  • *
  • Posts: 131
  • Karma: +0/-0
    • View Profile
Re: Error when Browsing SSL Site
« Reply #2 on: 2016-11-11, 10:19:21 »
Sorry i can't understand, what i do now ?
i have already .htaccess with
Code: [Select]
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^password-reset/([^\/]+)(\/|)$  index.php?link1=welcome&link2=password_reset&user_id=$1 [NC,QSA]
RewriteRule ^admincp$ index.php?link1=admincp [NC,QSA]
RewriteRule ^start-up$ index.php?link1=start-up [NC,QSA]
RewriteRule ^admincp/(.*)$ index.php?link1=admincp&page=$1 [NC,QSA]
RewriteRule ^saved-posts/(.*)$ index.php?link1=saved-posts [NC,QSA]
RewriteRule ^activated/(.*)$ index.php?link1=activate&link2=$1 [NC,QSA]
RewriteRule ^search$ index.php?link1=search [NC,QSA]
RewriteRule ^ads-create$ index.php?link1=ads-create [NC,QSA]
RewriteRule ^search/([^\/]+)(\/|)$ index.php?link1=search&query=$1 [NC,QSA]
RewriteRule ^app/([^\/]+)(\/|)$ index.php?link1=app&app_id=$1 [NC,QSA]
RewriteRule ^messages/([^\/]+)(\/|)$  index.php?link1=messages&user=$1 [QSA]
RewriteRule ^terms/([^\/]+)(\/|)$  index.php?link1=terms&type=$1 [QSA]
RewriteRule ^video-call/([^\/]+)(\/|)$  index.php?link1=video-call&call_id=$1 [QSA]
RewriteRule ^post/([^\/]+)(\/|)$ index.php?link1=post&id=$1 [NC,QSA]
RewriteRule ^game/([^\/]+)(\/|)$ index.php?link1=game&id=$1 [NC,QSA]
RewriteRule ^upgraded$ index.php?link1=upgraded [NC,QSA]
RewriteRule ^games$ index.php?link1=games [NC,QSA]
RewriteRule ^new-game$ index.php?link1=new-game [NC,QSA]
RewriteRule ^go-pro$ index.php?link1=go-pro [NC,QSA]
RewriteRule ^oops$ index.php?link1=oops [NC,QSA]
RewriteRule ^user-activation$ index.php?link1=user-activation [NC,QSA]
RewriteRule ^hashtag/([^\/]+)(\/|)$ index.php?link1=hashtag&hash=$1 [NC,QSA]
RewriteRule ^follow-requests/(.*)$ index.php?link1=follow-requests[NC,QSA]
RewriteRule ^p/([^\/]+)(\/|)$ index.php?link1=page&p=$1 [NC,QSA]
RewriteRule ^g/([^\/]+)(\/|)$ index.php?link1=group&g=$1 [NC,QSA]
RewriteRule ^home$ index.php?link1=home [QSA]
RewriteRule ^404$ index.php?link1=404 [QSA]
RewriteRule ^welcome(.*)$ index.php?link1=welcome [QSA,L]
RewriteRule ^register$ index.php?link1=register [QSA,L]
RewriteRule ^confirm-sms$ index.php?link1=confirm-sms [QSA,L]
RewriteRule ^forgot-password$ index.php?link1=forgot-password [QSA,L]
RewriteRule ^activate$ index.php?link1=activate [QSA]
RewriteRule ^pages$ index.php?link1=pages [QSA]
RewriteRule ^groups$ index.php?link1=groups [QSA]
RewriteRule ^create-group$ index.php?link1=create-group [QSA]
RewriteRule ^create-page$ index.php?link1=create-page [QSA]
RewriteRule ^logout$ index.php?link1=logout [QSA]
RewriteRule ^contact-us$ index.php?link1=contact-us [QSA]
RewriteRule ^setting$ index.php?link1=setting [QSA]
RewriteRule ^messages$  index.php?link1=messages [QSA]
RewriteRule ^saved-posts$ index.php?link1=saved-posts [NC,QSA]
RewriteRule ^albums$ index.php?link1=albums [QSA]
RewriteRule ^albums/([A-Za-z0-9_-]+)$ index.php?link1=albums&user=$1 [QSA]
RewriteRule ^album/([A-Za-z0-9_-]+)$ index.php?link1=album&id=$1 [QSA]
RewriteRule ^create-album$ index.php?link1=create-album [QSA]
RewriteRule ^create-album/([A-Za-z0-9_-]+)$ index.php?link1=create-album&album=$1  [QSA]
RewriteRule ^$ index.php?link1=home [QSA]
RewriteRule ^setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$  index.php?link1=setting&user=$1&page=$2 [NC,QSA]
RewriteRule ^page-setting/([^\/]+)(\/|)$  index.php?link1=page-setting&page=$1 [QSA]
RewriteRule ^page-setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$  index.php?link1=page-setting&page=$1&link3=$2 [QSA]
RewriteRule ^group-setting/([^\/]+)(\/|)$ index.php?link1=group-setting&group=$1 [QSA]
RewriteRule ^group-setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$  index.php?link1=group-setting&group=$1&link3=$2 [QSA]
RewriteRule ^new-product$ index.php?link1=new-product [NC,QSA]
RewriteRule ^edit-product/([A-Za-z0-9_]+)$ index.php?link1=edit-product&id=$1 [NC,QSA]
RewriteRule ^products$ index.php?link1=products [NC,QSA]
RewriteRule ^products/([A-Za-z0-9_-]+)$ index.php?link1=products&c_id=$1 [QSA]
RewriteRule ^my-products$ index.php?link1=my-products [QSA]
RewriteRule ^site-pages/(.*)$ index.php?link1=site-pages&page_name=$1 [NC,QSA]

RewriteRule ^_$ requests.php [QSA]

RewriteRule ^graph-success$ index.php?link1=graph-success [NC,QSA]
RewriteRule ^developers$ index.php?link1=developers [NC,QSA]
RewriteRule ^apps$ index.php?link1=apps [NC,QSA]
RewriteRule ^create-app$ index.php?link1=create-app [NC,QSA]
RewriteRule ^graph$ index.php?link1=graph [NC,QSA]
RewriteRule ^oauth$ index.php?link1=oauth [NC,QSA]

RewriteRule ^boosted-pages$ index.php?link1=boosted-pages [NC,QSA]
RewriteRule ^boosted-posts$ index.php?link1=boosted-posts [NC,QSA]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^setting/([A-Za-z0-9_-]+)$  index.php?link1=setting&page=$1 [NC,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^@([^\/]+)(\/|)$  index.php?link1=timeline&u=$1 [QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9_]+)/([^\/]+)(\/|)$  index.php?link1=timeline&u=$1&type=$2 [QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\/]+)(\/|)$  index.php?link1=timeline&u=$1 [QSA]

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/opentype
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_security.c>
  SecFilterScanPOST Off
</IfModule>

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Error when Browsing SSL Site
« Reply #3 on: 2016-11-11, 14:36:00 »
Maybe you need set 'site url' in application using 'https://' instead 'http://' or change "Strict-Transport-Security "max-age=2592000; preload"" to "No-Strict-Transport-Security "max-age=2592000; preload""
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline letux

  • Valuable Member
  • *
  • Posts: 131
  • Karma: +0/-0
    • View Profile
Re: Error when Browsing SSL Site
« Reply #4 on: 2016-11-11, 14:50:02 »
i'am already use 'https' as site url in application config file.
and now i changed  "Strict-Transport-Security "max-age=2592000; preload"" to "No-Strict-Transport-Security "max-age=2592000; preload"" from 'Web Features'
but still the same issue, i can't browse site .

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Error when Browsing SSL Site
« Reply #5 on: 2016-11-11, 15:09:29 »
Try clear browser cache and history.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline letux

  • Valuable Member
  • *
  • Posts: 131
  • Karma: +0/-0
    • View Profile
Re: Error when Browsing SSL Site
« Reply #6 on: 2016-11-11, 15:18:41 »
it's resolved now and i will write topic with full steps to be clearly document .

thank you mostafa :)

Offline letux

  • Valuable Member
  • *
  • Posts: 131
  • Karma: +0/-0
    • View Profile
Re: Error when Browsing SSL Site
« Reply #7 on: 2016-11-11, 15:26:56 »
Ok, Then ..
If you want to Enable SSl with Apache and NginX-Proxy you shuld follow this steps.

1- open SSh and login as root
2- then
Code: [Select]
cd '/opt/configs/nginx/conf/globals' 3- you will fiend four files
--- proxy_standard.conf
--- proxy_standard_ssl.conf
--- proxy_wildcards.conf
--- proxy_wildcards_ssl.conf

copy every file to custom file :

Code: [Select]
cp proxy_standard.conf custom.proxy_standard.conf
Code: [Select]
cp proxy_standard_ssl.conf  custom.proxy_standard_ssl.conf
Code: [Select]
cp proxy_wildcards.conf custom.proxy_wildcards.conf
Code: [Select]
cp proxy_wildcards_ssl.conf custom.proxy_wildcards_ssl.conf
and now you have custom copy from proxy files,

4- edit custom proxy files by vim or nano
Code: [Select]
nano custom.proxy_standard.conf
Find all the lines where it says proxy_set_header and add this line:
Quote
proxy_set_header X-Forwarded-Protocol $scheme;

Code: [Select]
nano custom.proxy_standard_ssl.conf
Find all the lines where it says proxy_set_header and add this line:
Quote
proxy_set_header X-Forwarded-Protocol $scheme;

Code: [Select]
nano custom.proxy_wildcards.conf
Find all the lines where it says proxy_set_header and add this line:
Quote
proxy_set_header X-Forwarded-Protocol $scheme;

Code: [Select]
nano custom.proxy_wildcards_ssl.conf
Find all the lines where it says proxy_set_header and add this line:
Quote
proxy_set_header X-Forwarded-Protocol $scheme;

5- after that run
Code: [Select]
sh /script/fixweb; sh /script/restart-all
6- Add this to the .htaccess of the domain with ssl:
Quote
SetEnvIf X-Forwarded-Protocol https HTTPS=on

------
if you still have problem, join to CP and open domain panel => Web Features
and change "Strict-Transport-Security "max-age=2592000; preload"" to "No-Strict-Transport-Security "max-age=2592000; preload""

and don't forgot set 'site url' in application using 'https://' instead 'http://'

thanks for chrisf
https://forum.mratwork.com/kloxo-mr-tips-and-tricks/php-force-redirect-ssl-nginxproxy-endless-loop/
and many thanks for Mostafa Ramadan
https://forum.mratwork.com/kloxo-mr-technical-helps/error-when-browsing-ssl-site/

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.066 seconds with 19 queries.

web stats analysis