mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-11 02:36:37 +00:00
5f10ccd9c7
For people installing an instance with only the reverse proxy server, the hidden trailing `}` at the end of the second server block is quite hard to catch and it took me a good while to figure it out. Having the entire server commented out makes the whole process more understandable in my opinion.
81 lines
1.7 KiB
Text
81 lines
1.7 KiB
Text
include /etc/nginx/conf.d/server_config;
|
|
|
|
upstream web {
|
|
server web:8000;
|
|
}
|
|
|
|
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 {
|
|
# 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;
|
|
# }
|
|
#
|
|
# 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/;
|
|
# }
|
|
# }
|
|
|
|
# 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/;
|
|
# }
|
|
# }
|