Hi,
I am setting up a vmware esxi host with one external ip address serving three domains.
www.hanscees.com
www.hanscees.net
www.jvandenboom.com
www.myschool.nl
In the vmware esxi I have several webhosts all on their own OS. Like this:
192.168.0.80= apache server
hanscees.com
hanscees.net
192.168.0.81= joomla server
jvandenboom.com
192.168.0.82= some schoolgroupware
myschool.nl
My plan is to install an ubuntu special purpose lightwait ngix reverse proxy to dispatch incoming webrequests for all these vmware based servers.
It should redirect transparently, ie rewrite requests and answers so clients and servers cannot see it is there.
Can you help me out with a configuration please?
My best quess is this:
server {
listen 80;
server_name *.hanscees.com
rewrite ^ http://www.hanscees.com$request_uri permanent;
}
server {
listen 80;
server_name www.hanscees.com;
# pass requests to appliance
location / {
proxy_pass http://192.168.0.80:80;
include /etc/nginx/proxy.conf;
}
and this for every domain. Is that a good setup?
What should I put in proxy.conf?
proxy.conf:
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 128m;
client_body_buffer_size 256k;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_buffer_size 4k;
proxy_buffers 32 256k;
proxy_busy_buffers_size 512k;
proxy_temp_file_write_size 512k;
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
gzip on;
gzip_proxied expired no-cache no-store private auth;
gzip_comp_level 9;
server_names_hash_bucket_size 100;