View Single Post
  #20  
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
Default

some more progress:

made some more progress with the help of some guys on IRC it seems these lines work:
Quote:
listen 80 default;
proxy_pass http://127.0.0.1:82;

as 127.0.0.1 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:

Quote:
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
Quote:
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