Control Web Panel
WebPanel => CentOS 7 Problems => Topic started by: LostnIL on July 19, 2018, 04:59:49 PM
-
Hi Forum
Has anyone tried to use Apache + Varnish + Nginx with WordPress/SSL sites? I am running a default install of CWP7 Pro with a Domain and SSL installed via AutoSSL.
When I enable Apache + Varnish + Nginx, the site goes down complaining "Too Many Redirects". I have not manually configured any redirects, CWP7 handled the HTTP/HTTPS with AutoSSL and in wordpress i adjusted the SiteURL to https://
Has anyone else experienced similar issues?
-
how did you set redirection from http to https ?
-
I had the same issue before. It was a pain. I tried so many solutions but none work for me but this one. I hope it will workout for you.
Add this "return 301 https://$host$request_uri;" to your "nginx_proxy_vhost" like below:
root DOCROOT;
return 301 https://$host$request_uri;
location / {
location
That will redirect to https.
-
Hi Forum
Has anyone tried to use Apache + Varnish + Nginx with WordPress/SSL sites? I am running a default install of CWP7 Pro with a Domain and SSL installed via AutoSSL.
Yes, but My site works but does not show the website correctly, only when opened with http://website will the Wordpress Site Show correctly with all GFX etc.. https://website gives more a text like website with missing formats etc..
For now sadly :( I have reverted to Apache Only ....
-
I had the same issue before. It was a pain. I tried so many solutions but none work for me but this one. I hope it will workout for you.
Add this "return 301 https://$host$request_uri;" to your "nginx_proxy_vhost" like below:
root DOCROOT;
return 301 https://$host$request_uri;
location / {
location
That will redirect to https.
What if you want all traffic redirected to https://www.domain.tld?
I read that adding if statements in config files is frowned upon and that the best way is to add a separate server for domain.tld and one for www.domain.tld but I cannot get this to work.
I tried editing 'nginx_proxy_vhost_ssl' by removing YOURDOMAIN from server_name so only www.YOURDOMAIN remains and by adding another server directly below # Virtual host file starts here but it does not work.
Below is the top portion of my nginx_proxy_vhost_ssl template:
# Virtual host file starts here
# START of my edit to redirect to https://www.
server {
listen YOURSERVERIP:NGINXPORT;
server_name YOURDOMAIN;
return 301 $scheme://www.YOURDOMAIN$request_uri;
}
# !!! IMPORTANT - also had to remove YOURDOMAIN from server_name, a few lines below.
# END of my edit to redirect to https://www.
server {
listen YOURSERVERIP:NGINXPORT;
access_log /var/log/nginx/access.YOURDOMAIN.log;
error_log /var/log/nginx/error.YOURDOMAIN.log;
server_name www.YOURDOMAIN;
root DOCROOT;
...
So does this mean you can have only one server in the template?
-
I found solution:
Remove SSL certificate for domain and install again :)
Regards
Chris