This commit is contained in:
Luck
2021-10-27 23:37:42 +01:00
parent f2c46495b0
commit c6824094c3
9 changed files with 163 additions and 6 deletions

18
docker/nginx.conf Normal file
View File

@@ -0,0 +1,18 @@
# nginx config file for a SPA (single page app)
server {
listen 80 default_server;
gzip on;
gzip_min_length 1000;
gzip_types text/plain text/xml application/javascript text/css;
root /usr/share/nginx/html;
location / {
try_files $uri $uri/index.html /index.html;
}
location ~ \.(?!html) {
try_files $uri =404;
}
}

View File

@@ -0,0 +1,29 @@
# nginx reverse proxy configuration for paste+bytebin
server {
listen 80 default_server;
# paste app
location / {
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_set_header X-Forwarded-Host $server_name;
proxy_pass http://paste;
}
# disable bytebin frontend
location = /data/ {
return 404;
}
# proxy /data endpoint to bytebin
location /data/ {
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_set_header X-Forwarded-Host $server_name;
proxy_pass http://bytebin:8080/;
}
}