All,
Please forgive my newbie-ness. I could really appreciate your help in getting this configured before my frontal lobes get crushed by my monitor...
So I have several domains and or subdomains I need to route around to various machines or virtuals.
Setup:
Box 1 Windows 7 Professional with nginx
Box 2 Virtual Host for clubhouse IP .101
Box 3 Virtual Host for dev IP .102
Box 4 Virtual host for beta IP .103
Box 5 Ancient Webserver with some paleolithic websites I want to keep around. IP .4
What I want to do is:
1) send clubhouse.domainX.com requests to Box 2 and have the host header picked up to get it to the correct site. *This works* (and there was much rejoicing...yay...hooray)
2) send dev.domainX.com requests to Box 2 and have the host header picked up to get it to the correct site. This fails (boo...)
I think you get the picture.
Here is my config file
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
gzip on;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 75 20;
server_names_hash_bucket_size 64;
server {
listen 80;
server_name clubhouse.somedomain.com;
location / {
include proxy.conf;
access_log logs/clubhouse.access.log;
error_log logs/clubhouse.error.log;
proxy_pass http://192.168.1.101;
# proxy_redirect default;
root /clubhouse/;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
server_name dev.somedomain.com;
location / {
include proxy.conf;
access_log logs/dev.access.log;
error_log logs/dev.error.log;
proxy_pass http://192.168.1.102;
# proxy_redirect default;
# root /nas/;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
server_name paleolithicsubdomain.paleolithicdomain.org;
location / {
include proxy.conf;
access_log logs/paleolithicsubdomain.access.log;
error_log logs/paleolithicsubdomain.error.log;
proxy_pass http://192.168.1.4;
# proxy_redirect default;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}