Skip to content

Instantly share code, notes, and snippets.

@SeunMatt
Created March 21, 2019 15:26
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 SeunMatt/6a06f7f36116767095853a24b9c725d8 to your computer and use it in GitHub Desktop.
Save SeunMatt/6a06f7f36116767095853a24b9c725d8 to your computer and use it in GitHub Desktop.
A sample configuration file for nginx proxy server for Apache Tomcat
server_name app.ployref.com www.app.ployref.com;
# serve static files
location ^~ /assets/ {
root /opt/tomcat/webapps/ROOT/WEB-INF/classes/public;
expires 30d;
access_log off;
}
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment