Skip to content

Instantly share code, notes, and snippets.

@Pumpapa
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pumpapa/b5a909c802d5cbfdb816 to your computer and use it in GitHub Desktop.
Save Pumpapa/b5a909c802d5cbfdb816 to your computer and use it in GitHub Desktop.
DNAT:
DNAT net dmz:172.16.255.101:80 tcp 80
nginx:
upstream lamp {
server 172.16.255.100:80;
}
...
server {
listen 80;
server_name domain.nl *.domain.nl;
location / {
proxy_pass http://lamp;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host domain.nl;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
apache:
<VirtualHost *:80>
ServerName domain.nl
ServerAlias www.domain.nl
DocumentRoot /var/www/domain.nl
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment