You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
5.3 KiB

user nginx lilia;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /app;
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~* ^/.+\.(?:jpg|jpeg|gif|png|ico|cur|mp4|ogg|ogv|webm|htc|xml|eot|woff|woff2|ttf|svg|otf)$ {
root /app;
expires 1M;
add_header Cache-Control public;
}
location ~ ^/.+\.php$ {
root /app;
index index.php;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
fastcgi_pass cms:9000;
}
6 years ago
location ^~ /clips/assets/ {
root /clips;
}
6 years ago
location ^~ /horde-map/assets/ {
root /horde-map;
}
location ^~ /gifted-subs/assets/ {
root /gifted-subs;
}
location ^~ /merchandise/assets/ {
root /merchandise;
}
location ^~ /quotes/assets/ {
root /quotes;
}
location ^~ /regular-subs/assets/ {
root /regular-subs;
}
7 years ago
location ^~ /schedule/assets/ {
root /schedule;
}
location ^~ /twitch-logs/assets/ {
root /twitch-logs;
}
location ^~ /horde-members/api/ {
rewrite ^/horde-members/api(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_pass http://horde-members-api:5000;
}
location ^~ /instagram/api/ {
rewrite ^/instagram/api(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_pass http://instagram-api:5000;
}
location ^~ /quotes/api/ {
rewrite ^/quotes/api(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_pass http://quotes-api:5000;
}
location ^~ /teespring/api/ {
rewrite ^/teespring/api(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_pass http://teespring-api:5000;
}
location ^~ /twitch-cache/api/ {
rewrite ^/twitch-cache/api(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_pass http://twitch-cache-api:5000;
}
location ^~ /twitch-subs/api/ {
rewrite ^/twitch-subs/api(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_pass http://twitch-subs-api:5000;
}
location ^~ /twitch-webhooks/ {
rewrite ^/twitch-webhooks(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_pass http://twitch-webhooks:5000;
}
location ^~ /twitch-events/ {
rewrite ^/twitch-events(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://twitch-events:8765;
}
location ^~ /schedule {
return 301 /#livestreams;
}
location ^~ /specs {
return 301 /wiki/specs;
}
location ^~ /commands {
return 301 /wiki/commands;
}
location ~ /\.ht {
deny all;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}