Skip to content

Instantly share code, notes, and snippets.

@bodziek666
Created August 15, 2020 15:41
Show Gist options
  • Save bodziek666/1569db0286dd8070f24e0e3967eedb97 to your computer and use it in GitHub Desktop.
Save bodziek666/1569db0286dd8070f24e0e3967eedb97 to your computer and use it in GitHub Desktop.
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