pubtester/files/nginx.conf

117 lines
2.8 KiB
Nginx Configuration File

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
#server {
# listen 80;
# listen [::]:80;
# root /mnt/none;
# index index.html index.htm;
# server_name mastodon.pubtester.example.net;
# absolute_redirect off;
# server_name_in_redirect off;
# error_page 404 /404.html;
# error_page 410 /410.html;
# location / {
# proxy_set_header Host $http_host;
# proxy_set_header X-Forwarded-Proto https;
# proxy_pass http://mastodon_web:3000;
# }
# location ^~ /api/v1/streaming {
# proxy_set_header Host $http_host;
# proxy_set_header X-Forwarded-Proto https;
# proxy_pass http://mastodon_streaming:4000;
# proxy_buffering off;
# proxy_redirect off;
# proxy_http_version 1.1;
# tcp_nodelay on;
# }
#}
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
root /mnt/none;
index index.html index.htm;
server_name pleroma.pubtester.example.net;
absolute_redirect off;
server_name_in_redirect off;
ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/key.pem;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://pleroma_web:4000;
}
}
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
root /mnt/none;
index index.html index.htm;
server_name pleroma2.pubtester.example.net;
absolute_redirect off;
server_name_in_redirect off;
ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/key.pem;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://pleroma2_web:4000;
}
}
}