Hi Nicholas,
I followed your guidelines but I think I'm still missing something.
Nginx is always displaying the same site. However when I bypass nginx by adding the port on which apache is running the correct site is shown.
I did a test-setup on a Ubuntu server running in Virtualbox.
These are the nginx virtualhost files:
Code:
server {
listen 80;
server_name site1;
root /var/www/site1;
location / { proxy_pass http://127.0.1.1:8080; }
}Code:
server {
listen 80;
server_name site2;
root /var/www/site2;
location / { proxy_pass http://127.0.1.1:8080; }
}and these from apache:
Code:
<VirtualHost *:8080>
ServerAdmin webmaster@example.com
ServerName site1
DocumentRoot /var/www/site1
<Directory /var/www/site1>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Code:
<VirtualHost *:8080>
ServerAdmin webmaster@example.com
ServerName site2
DocumentRoot /var/www/site1
<Directory /var/www/site2>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
When removing the
Code:
location / { proxy_pass http://127.0.1.1:8080; }from the nginx vhost files and stopping the apache server it's working fine.
What could be missing?