you will got problem when Enable SSl 'i'am use let'sencrypt' with Apache and NginX-proxy.
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
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 :
cp proxy_standard.conf custom.proxy_standard.conf
cp proxy_standard_ssl.conf custom.proxy_standard_ssl.conf
cp proxy_wildcards.conf custom.proxy_wildcards.conf
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
nano custom.proxy_standard.conf
Find all the lines where it says proxy_set_header and add this line:
proxy_set_header X-Forwarded-Protocol $scheme;
nano custom.proxy_standard_ssl.conf
Find all the lines where it says proxy_set_header and add this line:
proxy_set_header X-Forwarded-Protocol $scheme;
nano custom.proxy_wildcards.conf
Find all the lines where it says proxy_set_header and add this line:
proxy_set_header X-Forwarded-Protocol $scheme;
nano custom.proxy_wildcards_ssl.conf
Find all the lines where it says proxy_set_header and add this line:
proxy_set_header X-Forwarded-Protocol $scheme;
5- after that run
sh /script/fixweb; sh /script/restart-all
6- Add this to the .htaccess of the domain with ssl:
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/