Skip to content

Commit

Permalink
CHORE: Fmt nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo authored Oct 15, 2024
1 parent 9e750ad commit 931c7f2
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions dmoj/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ events {
worker_connections 1024;
}
http {

include mime.types;

# Logging

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
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 /dev/stdout main;
access_log /dev/stdout main;


server {
Expand All @@ -28,12 +29,13 @@ http {
}

server {
resolver 127.0.0.11 valid=10s;
resolver_timeout 5s;

resolver 127.0.0.11 valid=10s;
resolver_timeout 5s;

listen 443 ssl;
listen [::]:443 ssl;
http2 on;
http2 on;

server_name mcpt.ca;

Expand Down Expand Up @@ -84,12 +86,13 @@ http {
}

location @uwsgi {
# see https://stackoverflow.com/a/56487286/18516611
set $target_host site;

# see https://stackoverflow.com/a/56487286/18516611
set $target_host site;
uwsgi_read_timeout 600;
uwsgi_pass $target_host:8000;
include uwsgi_params;
uwsgi_param HTTP_HOST $server_name;
uwsgi_param HTTP_HOST $server_name;
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}

Expand All @@ -101,13 +104,15 @@ http {
}

location /media {
expires @24h;

expires @24h;
alias /media/;
}

location /pdfcache {

internal;
expires @24h;
expires @24h;
root /;
}

Expand All @@ -122,7 +127,7 @@ http {
default_type image/svg+xml;
alias /mathoid;
access_log off;
expires 30d;
expires 30d;
add_header Cache-Control "max-age=2592000, public"; # 30 days

}
Expand All @@ -132,12 +137,13 @@ http {
default_type image/svg+xml;
alias /texoid;
access_log off;
expires 30d;
add_header Cache-Control "max-age=2592000, public"; # 30 days
expires 30d;
add_header Cache-Control "max-age=2592000, public"; # 30 days
}

location /event/ {
set $event_host wsevent;

set $event_host wsevent;
proxy_pass http://$event_host:15100/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
Expand All @@ -146,10 +152,11 @@ http {
}

location /channels/ {
set $channels_host wsevent;

set $channels_host wsevent;
proxy_read_timeout 120;
proxy_pass http://$channels_host:15102/;
}
}

}
}

0 comments on commit 931c7f2

Please sign in to comment.