Skip to content

Instantly share code, notes, and snippets.

@lesstif
Created October 11, 2019 11:21
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 lesstif/3cefe44a458baba8cd5b9e90c89e2ef6 to your computer and use it in GitHub Desktop.
Save lesstif/3cefe44a458baba8cd5b9e90c89e2ef6 to your computer and use it in GitHub Desktop.
nginx virtual host setup example
server {
listen 80;
server_name example.com;
charset utf-8;
rewrite_log on;
access_log /var/log/nginx/jira-lesstif.com.access.log main;
error_log /var/log/nginx/jira-lesstif.com.error.log notice;
client_max_body_size 10M;
location / {
proxy_pass http://127.0.0.1:9080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ /\.ht {
deny all;
}
#location = /favicon.ico { access_log off; log_not_found off; }
#location = /robots.txt { access_log off; log_not_found off; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment