You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the problem when I install the whole setup everything works fine with the exception that it only works for the non-www sites which I used in the installation process. If I open the www.-version of a site it redirects to the first wordpress-site installed during the process but not to the non-www version.
There are various tutorials available like this one here https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-nginx-on-centos-7 on how to do a 301 redirect with nginx and I tried many different ways of redirecting but they either didn't work or even ended up in the server not functioning anymore.
I guess it is because of using varnish with nginx together it is more complicated that with nginx alone as it is outlined in this article: https://danielmiessler.com/blog/handling-redirects-with-varnish-and-nginx/
Could someone suggest a solution that works with this particular set-up?
The text was updated successfully, but these errors were encountered:
I could solve this issue with the answer given on that site: http://serverfault.com/questions/441966/how-to-redirect-from-www-to-non-www-varnish - however that seems to cause new problems with WP not functioning properly, e.g. WP logging out and not being able to upload files to the page. So I'm still looking for a better solution...
Update one day later: I have two installs of the hgv-deploy-full and got two different results: On the first install I couldn't get the varnish redirect to work, here I turned off varnish and did the redirect in nginx. If doing the redirect in nginx it is important to open two server codes in the /etc/nginx/sites-available/website.tld as described here: http://stackoverflow.com/questions/7947030/nginx-no-www-to-www-and-www-to-no-www?rq=1. Before I always tried to put the redirect and the other parts in one server code and that ended up in loop errors with the browser.
On the other install I got the varnish redirect working. Here it is important to note that zach's hgv install uses varnish 3 and not varnish 4. The error noted above with the problems with WP stemed from me using the code for varnish 4. These codes for varnish 3 worked well for me: http://docs.evine.co/redirect-www-to-non-www-in-varnish/
I have the problem when I install the whole setup everything works fine with the exception that it only works for the non-www sites which I used in the installation process. If I open the www.-version of a site it redirects to the first wordpress-site installed during the process but not to the non-www version.
There are various tutorials available like this one here https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-nginx-on-centos-7 on how to do a 301 redirect with nginx and I tried many different ways of redirecting but they either didn't work or even ended up in the server not functioning anymore.
I guess it is because of using varnish with nginx together it is more complicated that with nginx alone as it is outlined in this article: https://danielmiessler.com/blog/handling-redirects-with-varnish-and-nginx/
Could someone suggest a solution that works with this particular set-up?
The text was updated successfully, but these errors were encountered: