non-www to www forwarding with nginx/apache

Strator

Verified User
Joined
Jan 19, 2011
Messages
250
I would like to forward all instances of example.com to WWW.example.com with nginx/apache. Can someone let me know what the best practice is to get this done?

I came across this page here which seems to describe what is needed:

http://stackoverflow.com/questions/7947030/nginx-no-www-to-www-and-www-to-no-www

...but I don't want to edit every instance of /usr/local/directadmin/data/users/user/nginx.conf manually, plus, I'd like to make sure that the change survives future updates by Custombuild.

Thanks in advance!
 
Alex, are you sure this will also work for the nginx/apache setup? I thought that was actually the reason why my original setup (which worked fine in an apache-only environment) broke in the first place.
 
Back
Top