bookwyrm/nginx/production

91 lines
2 KiB
Text
Raw Normal View History

2021-05-23 06:27:02 +00:00
include /etc/nginx/conf.d/server_config;
upstream web {
server web:8000;
}
server {
listen [::]:80;
listen 80;
2021-05-23 06:27:02 +00:00
server_name your-domain.com www.your-domain.com;
location ~ /.well-known/acme-challenge {
allow all;
root /var/www/certbot;
}
2021-05-23 06:27:02 +00:00
# # redirect http to https
# return 301 https://your-domain.com$request_uri;
}
2021-05-23 06:27:02 +00:00
#
# server {
# listen [::]:443 ssl http2;
# listen 443 ssl http2;
#
# server_name your-domain.com;
2021-09-06 16:43:41 +00:00
#
# client_max_body_size 3M;
#
# if ($host != "your-domain.com") {
2021-09-05 21:13:54 +00:00
# return 301 $scheme://your-domain.com$request_uri;
# }
2021-05-23 06:27:02 +00:00
#
# # 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;
# }
#
2022-10-14 10:53:51 +00:00
# location ~ ^/(login[^-]|password-reset|resend-link|2fa-check) {
2022-07-15 20:19:42 +00:00
# limit_req zone=loginlimit;
#
# proxy_pass http://web;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $host;
# proxy_redirect off;
# }
#
2021-05-23 06:27:02 +00:00
# location / {
# proxy_pass http://web;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $host;
# proxy_redirect off;
# }
#
# location /images/ {
# alias /app/images/;
# }
#
# location /static/ {
# alias /app/static/;
# }
# }
2021-05-23 06:27:02 +00:00
# Reverse-Proxy server
# server {
# listen [::]:8001;
# listen 8001;
# server_name your-domain.com www.your-domain.com;
# location / {
# proxy_pass http://web;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $host;
# proxy_redirect off;
# }
# location /images/ {
# alias /app/images/;
# }
# location /static/ {
# alias /app/static/;
# }
# }