View Single Post
Old 11th May 2012, 14:27
sumfvm sumfvm is offline
HowtoForge Supporter
Join Date: Sep 2011
Location: Strasbourg, France
Posts: 25
Thanks: 2
Thanked 1 Time in 1 Post
Default Apache2 to Apache2 + Nginx

Hi all,

I follow this guide:

All is working perfectly for all customers who own a subdomain like but for those owning their own domain name, they are redirected to and don't work anymore, not fully, the files like .css and .js aren't found (nginx's logs showing that nginx try to find /var/www/ instead of /var/www/

I think it is because this Nginx directive:
#### www. redirect	- all domains starting with www will be redirected to http://domain. ####
    if ($host ~* ^(www\.)(.+)) {
        set $rawdomain $2;
        rewrite ^/(.*)$  http://$rawdomain/$1 permanent;
In fact, I don't understand the presence of it...

Any idea?

Reply With Quote
Sponsored Links