Files
newznab-tmux-NNTmux/docker/nginx.conf
T
Beshoy Girgis 472cdca270 Update docker implementation
I've made various updates to the docker implementation to work with the
latest php7 and currently blocks php8 until we deem nntmux ready. I've
also made modifications that allow for customizations without leaving a
dirty git status i.e. moving redis, etc. to an overrides file that is
gitignored and php customizations i.e. locale to a local overrides file
that is also gitignored.

The new docker implementation utilizes supervisord to run various
services in the web container, i.e. nginx, php-fpm, horizon, etc.

I plan to continue to maintain this as needed. Closes #1152
2021-01-31 21:55:32 -06:00

89 lines
2.6 KiB
Nginx Configuration File

user nntmux;
worker_processes 1;
daemon off;
error_log /dev/stderr;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
types_hash_max_size 4096;
server_names_hash_bucket_size 128;
# 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;
sendfile on;
# tcp_nopush on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
root /site/public;
server_name _;
index index.php index.html index.htm;
# add_header 'Access-Control-Allow-Origin' "$http_origin";
# add_header 'Access-Control-Allow-Credentials' 'true';
# add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
# add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With';
fastcgi_read_timeout 86400;
location ~* \.(?:css|eot|gif|gz|ico|inc|jpe?g|js|ogg|oga|ogv|mp4|m4a|mp3|png|svg|ttf|txt|woff|xml)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~* \.(?:css|eot|gif|gz|ico|inc|jpe?g|js|ogg|oga|ogv|mp4|m4a|mp3|png|svg|ttf|txt|woff|xml)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location ^~ /covers/ {
# This is where the nZEDb covers folder should be in.
root /site/resources;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_ignore_client_abort on;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SERVER_NAME $http_host;
fastcgi_param HTTPS on;
fastcgi_pass unix:/run/php-fpm7/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $uri =404;
}
}
}
# vim: ft=nginx