Created
June 3, 2018 07:27
-
-
Save serverok/8fb73df8135774f292bb2cc86446ae2c to your computer and use it in GitHub Desktop.
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 { | |
server_name serverok.in www.serverok.in; | |
root /var/www/html/; | |
access_log /var/log/nginx/default_server.log; | |
autoindex on; | |
index index.php; | |
location ~ ^/.well-known/ { | |
allow all; | |
access_log off; | |
log_not_found off; | |
autoindex on; | |
#alias /var/www/html; | |
} | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass http://127.0.0.1:8080; | |
} | |
listen 443 ssl; # managed by Certbot | |
ssl_certificate /etc/letsencrypt/live/serverok.in/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/serverok.in/privkey.pem; # managed by Certbot | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | |
} |
Nginx Proxy How-to
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reverse Proxy to SSL backend on another server.