feat: Add a compose file
This commit is contained in:
37
server/nginx.conf
Normal file
37
server/nginx.conf
Normal file
@@ -0,0 +1,37 @@
|
||||
events {}
|
||||
|
||||
http {
|
||||
# Log warnings
|
||||
#error_log /var/log/nginx.log warn;
|
||||
# TODO: Remove
|
||||
error_log /dev/stdout info;
|
||||
|
||||
# No idea, but nginx refuses to start without it
|
||||
server_names_hash_bucket_size 64;
|
||||
|
||||
# The actual webserver duties
|
||||
server {
|
||||
# server_name lateinicus;
|
||||
listen 80 default_server;
|
||||
|
||||
# Reverse Proxy
|
||||
location /api/ {
|
||||
# Seems weird, but it is (Prevent /api/api/)
|
||||
rewrite /api/(.*) /api/$1 break;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass http://128.1.0.3:8080;
|
||||
}
|
||||
|
||||
# The web app
|
||||
location /app/ {
|
||||
# CSS might not get the correct Content-Type header
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
root /srv/www;
|
||||
# For react-router
|
||||
try_files $uri /app/index.html;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user