bookwyrm/nginx/production
Ilkka Ollakka bb5986d9fd nginx: split nginx configs to common parts
Also create separated reverse_proxy config so it is more clear what it needs to contain.
2025-04-04 22:21:54 +03:00

82 lines
2 KiB
Text

include /etc/nginx/conf.d/server_config;
upstream web {
server web:8000;
}
upstream flower{
server flower:8888;
}
server {
listen [::]:80;
listen 80;
server_name your-domain.com www.your-domain.com;
location ~ /.well-known/acme-challenge {
allow all;
root /var/www/certbot;
}
# # redirect http to https
# return 301 https://your-domain.com$request_uri;
}
# server {
# access_log /var/log/nginx/access.log cache_log;
#
# listen [::]:443 ssl http2;
# listen 443 ssl http2;
#
# server_name your-domain.com;
#
# client_max_body_size 3M;
#
# if ($host != "your-domain.com") {
# return 301 $scheme://your-domain.com$request_uri;
# }
#
# # SSL code
# ssl_certificate /etc/nginx/ssl/live/your-domain.com/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/live/your-domain.com/privkey.pem;
#
# location ~ /.well-known/acme-challenge {
# allow all;
# root /var/www/certbot;
# }
#
# sendfile on;
# tcp_nopush on;
# tcp_nodelay on;
# keepalive_timeout 65;
# types_hash_max_size 2048;
# #include /etc/nginx/mime.types;
# #default_type application/octet-stream;
#
# gzip on;
# gzip_disable "msie6";
#
# proxy_read_timeout 1800s;
# chunked_transfer_encoding on;
#
# # store responses to anonymous users for up to 1 minute
# proxy_cache bookwyrm_cache;
# proxy_cache_valid any 1m;
# add_header X-Cache-Status $upstream_cache_status;
#
# # ignore the set cookie header when deciding to
# # store a response in the cache
# proxy_ignore_headers Cache-Control Set-Cookie Expires;
#
# # PUT requests always bypass the cache
# # logged in sessions also do not populate the cache
# # to avoid serving personal data to anonymous users
# proxy_cache_methods GET HEAD;
# proxy_no_cache $cookie_sessionid;
# proxy_cache_bypass $cookie_sessionid;
#
# include /etc/nginx/conf.d/locations;
#
# }