View Single Post
Old 3rd November 2010, 18:53
Ovidiu Ovidiu is offline
Senior Member
Join Date: Sep 2005
Posts: 1,266
Thanks: 82
Thanked 24 Times in 20 Posts

some more progress:

made some more progress with the help of some guys on IRC it seems these lines work:
listen 80 default;

as is enough, no need to use $host there as this is a reverse proxy, nginx and apache2 are on the same box.

and another suggestion to solve the www vs non-www problem was something like this:

set $site_dir $host; if ($host ~ ^www\.(.*)) { set $site_dir $1; } root /var/www/$site_dir/web;
but I can't put it togetehr alone. also would it not need an else statement to keep
root /var/www/$host/web;
in case the non-www version was called?

Last edited by Ovidiu; 3rd November 2010 at 19:23.
Reply With Quote