padloc/docs/examples/hosting/docker/nginx/nginx.conf

51 lines
1.1 KiB
Nginx Configuration File

user nginx;
worker_processes auto;
http {
# BASIC SETTINGS
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# Required for attachments
client_max_body_size 10m;
# Enable gzip
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
include mime.types;
# Disallow embedding in iFrames
add_header X-Frame-Options deny;
server {
# We don't need a host name here since we're only
# dealing with one domain, but you may insert your domain here.
server_name _;
# Both server and pwa are served over https
listen 80;
# This will resolve to the server instance
location /server {
resolver 127.0.0.11 valid=60s;
set $server "http://server:3000";
proxy_pass $server;
}
# This will resolve to the web app
location / {
root /pwa;
index index.html;
try_files $uri /index.html;
}
}
}
events {
}