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.

160 lines
4.5 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;
}
location ^~ /clips/assets/ {
root /clips;
}
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;
}
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 ^~ /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;
}
}
}