Created
October 11, 2019 11:21
-
-
Save lesstif/3cefe44a458baba8cd5b9e90c89e2ef6 to your computer and use it in GitHub Desktop.
nginx virtual host setup example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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