Skip to content

Instantly share code, notes, and snippets.

@dreizehnelf
Created October 24, 2016 11:05
Show Gist options
  • Save dreizehnelf/f92b23dea5245a3c322cdcea4e1cf362 to your computer and use it in GitHub Desktop.
Save dreizehnelf/f92b23dea5245a3c322cdcea4e1cf362 to your computer and use it in GitHub Desktop.
NGINX example configuration for proxy_pass
server {
# django
listen 80;
server_name 127.0.0.1 services.mydomain.local;
location /django/ {
proxy_pass http://127.0.0.1:9000/;
}
location /java/ {
proxy_pass http://192.168.0.2:6000/;
}
}
server {
# django
listen 80;
server_name django.mydomain.local;
location / {
proxy_pass http://127.0.0.1:9000;
}
}
server {
# Java EE
listen 80;
server_name java.mydomain.local;
location / {
proxy_pass http://192.168.0.2:6000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment