Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 198.27.64.29:80;
- listen 127.0.0.1:80;
- listen [2607:5300:60:191d::1]:80;
- server_name community.pcgamingwiki.com;
- root /webroot/pcgw-extras/ipb;
- client_max_body_size 2048m;
- server_name_in_redirect on;
- error_page 500 501 502 503 504 /error.html;
- error_page 404 /404.html;
- index index.php index.html index.htm;
- #Rewrite rules for IPB
- try_files $uri $uri/ /index.php?q=$request_uri;
- location / {
- if (!-e $request_filename){
- rewrite \.(jpeg|jpg|gif|png)$ /public/404.php break;
- }
- if (!-e $request_filename){
- rewrite ^(.*)$ /index.php break;
- }
- }
- location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
- access_log off;
- log_not_found off;
- expires 30d;
- }
- location ~* ^/(uploads|hooks|cache)/.*\.(php|cgi|pl|py|php3|php4|php5|php6|phtml|shtml)$
- {
- deny all;
- }
- location /forums/ {
- index index.php;
- try_files $uri $uri/ /forums/index.php?$uri&$args;
- rewrite ^ /index.php? last;
- }
- location /forums {
- index index.php;
- try_files $uri $uri/ /forums/index.php?$uri&$args;
- rewrite ^ /index.php? last;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- }
- location ~ \.php?$ {
- include /etc/nginx/fastcgi_params;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment