Prev Previous Post   Next Post Next
  #1  
Old 11th May 2012, 13: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: http://www.howtoforge.com/nginx-catc...n-debian-lenny

All is working perfectly for all customers who own a subdomain like user.my-domain.com but for those owning their own domain name, they are redirected to their-domain.com and www.their-domain.com 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/www.domain.com instead of /var/www/domain.com).

I think it is because this Nginx directive:
Code:
#### 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?

Regards,
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.1.4 causes Apache to have too many open files gkovacs Installation/Configuration 29 27th February 2013 08:59
Whole server went down wxman General 25 28th September 2012 18:32
Apache2 high load lano Server Operation 3 24th December 2011 17:29
ISPConfig 3.0.4 - Migrate from Apache2 to nginx maatien General 2 3rd November 2011 13:11
Apache2 alongside lighthttpd or nginx? talkingnews Server Operation 3 22nd May 2011 20:39


All times are GMT +2. The time now is 22:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.