Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save conscientiousness/4606eb934b66eff1b9aa9b09e993cdf7 to your computer and use it in GitHub Desktop.
Save conscientiousness/4606eb934b66eff1b9aa9b09e993cdf7 to your computer and use it in GitHub Desktop.
blog-update-Nginx-default-file
server {
server_name YOUR_DOMAIN_NAME;
listen 80 default_server;
listen [::]:80 default_server;
root /home/YOUR_VAPOR_FOLDER_PATH/Public;
index index.html;
try_files $uri @proxy;
location @proxy {
proxy_pass http://0.0.0.0:YOUR_PORT;
proxy_pass_header Server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Server;
proxy_connect_timeout 3s;
proxy_read_timeout 10s;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment