generated from coop-cloud/example
61 lines
1.3 KiB
Cheetah
61 lines
1.3 KiB
Cheetah
user www-data;
|
|
|
|
events {
|
|
worker_connections 768;
|
|
}
|
|
|
|
http {
|
|
upstream backend {
|
|
server {{ env "STACK_NAME" }}_app:8080;
|
|
}
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name example.com;
|
|
|
|
gzip on;
|
|
gzip_types
|
|
application/javascript
|
|
application/x-javascript
|
|
application/json
|
|
application/rss+xml
|
|
application/xml
|
|
image/svg+xml
|
|
image/x-icon
|
|
application/vnd.ms-fontobject
|
|
application/font-sfnt
|
|
text/css
|
|
text/plain;
|
|
gzip_min_length 256;
|
|
gzip_comp_level 5;
|
|
gzip_http_version 1.1;
|
|
gzip_vary on;
|
|
|
|
location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_pass http://backend;
|
|
proxy_redirect off;
|
|
}
|
|
|
|
location ~ ^/(css|img|js|fonts)/ {
|
|
root /var/www/example.com/static;
|
|
# Optionally cache these files in the browser:
|
|
# expires 12M;
|
|
}
|
|
|
|
location / {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_pass http://backend;
|
|
proxy_redirect off;
|
|
}
|
|
}
|
|
}
|