Created
August 15, 2020 15:41
-
-
Save bodziek666/1569db0286dd8070f24e0e3967eedb97 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 { | |
listen 80; | |
server_name localhost; | |
location ~* ^/(?:lib|test|node_modules) { | |
deny all; | |
} | |
location ~* ^/(?:Procfile|README.md|package.json|package-lock.json)$ { | |
deny all; | |
} | |
location ~* /\.git { | |
deny all; | |
} | |
location ~* /\. { | |
deny all; | |
} | |
location ~ ^/(.*)$ { | |
limit_except GET HEAD { | |
auth_basic 'Restricted'; | |
auth_basic_user_file /etc/nginx/.htpasswd; | |
} | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_pass http://hastebin:7777; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment