Docker
This commit is contained in:
18
docker/nginx.conf
Normal file
18
docker/nginx.conf
Normal 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;
|
||||
}
|
||||
}
|
||||
29
docker/reverseproxy-nginx.conf
Normal file
29
docker/reverseproxy-nginx.conf
Normal 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/;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user