mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 09:48:55 +00:00
4a5b660c4a
unset exec bits for all except start.sh
59 lines
1.9 KiB
Nginx Configuration File
59 lines
1.9 KiB
Nginx Configuration File
##
|
|
# You should look at the following URL's in order to grasp a solid understanding
|
|
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
|
# http://wiki.nginx.org/Pitfalls
|
|
# http://wiki.nginx.org/QuickStart
|
|
# http://wiki.nginx.org/Configuration
|
|
# http://interfacelab.com/nginx-php-fpm-apc-awesome/
|
|
#
|
|
# Generally, you will want to move this file somewhere, and start with a clean
|
|
# file but keep this around for reference. Or just disable in sites-enabled.
|
|
#
|
|
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
|
##
|
|
|
|
server {
|
|
# Change these settings to match your machine
|
|
listen 80; ## listen for ipv4; this line is default and implied
|
|
listen [::]:80 default_server ipv6only=on; ## listen for ipv6
|
|
server_name localhost; #this must be change to an ip or fqdn or else redirects will not work
|
|
|
|
# Everything below here doesn't need to be changed
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
root /var/www/newznab/www/;
|
|
index index.html index.htm index.php;
|
|
|
|
location ~* \.(?:ico|css|js|gif|inc|txt|gz|xml|png|jpe?g) {
|
|
expires max;
|
|
add_header Pragma public;
|
|
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
|
|
}
|
|
|
|
location / { try_files $uri $uri/ @rewrites; }
|
|
|
|
location @rewrites {
|
|
rewrite ^/([^/\.]+)/([^/]+)/([^/]+)/? /index.php?page=$1&id=$2&subpage=$3 last;
|
|
rewrite ^/([^/\.]+)/([^/]+)/?$ /index.php?page=$1&id=$2 last;
|
|
rewrite ^/([^/\.]+)/?$ /index.php?page=$1 last;
|
|
}
|
|
|
|
location /admin { }
|
|
location /install { }
|
|
|
|
location ~ \.php$ {
|
|
try_files $uri =404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
|
|
|
|
# With php5-cgi alone:
|
|
#fastcgi_pass 127.0.0.1:9000;
|
|
# With php5-fpm:
|
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
|
#fastcgi_index index.php;
|
|
include fastcgi_params;
|
|
#include /etc/nginx/fastcgi_params;
|
|
}
|
|
}
|