Skip to content

Instantly share code, notes, and snippets.

@anhldbk
Created November 14, 2014 02:27
Show Gist options
  • Save anhldbk/bc9ccf26b2d2a53e08a4 to your computer and use it in GitHub Desktop.
Save anhldbk/bc9ccf26b2d2a53e08a4 to your computer and use it in GitHub Desktop.
Virtual Host Configuration with Nginx
# Modify file /etc/nginx/sites-enabled/default
server {
listen 80;
server_name data.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080;
}
}
server {
listen 80;
server_name bigdata.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8081;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment