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.

147 lines
4.4 KiB

user nginx lilia;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
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_nodelay on;
tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
server {
listen 80;
server_name localhost;
location / {
root /app;
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
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 ^~ /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 ^~ /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;
tcp_nodelay on;
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;
tcp_nodelay on;
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;
tcp_nodelay on;
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;
tcp_nodelay on;
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;
tcp_nodelay on;
proxy_pass http://twitch-subs-api:5000/;
}
location ^~ /schedule {
return 301 /#livestreams;
}
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;
}
}
}