Skip to content

Instantly share code, notes, and snippets.

@steve-chavez
Created May 26, 2015 22:36
Show Gist options
  • Save steve-chavez/9faffa80f4c85b9e3103 to your computer and use it in GitHub Desktop.
Save steve-chavez/9faffa80f4c85b9e3103 to your computer and use it in GitHub Desktop.
Nginx config
upstream java_app{
server 127.0.0.1:8080;
}
server {
listen 80;
server_name 172.168.201.30;
access_log /home/eduardo/nginx-access.log;
error_log /home/eduardo/nginx-error.log;
location /static {
alias /home/eduardo/Projects/muni_victoria_frontend;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://java_app;
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment