Created
September 29, 2014 06:51
-
-
Save anonymous/d0ccce69d42dfe4be24d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name bitcall.org; | |
root /usr/share/nginx/html; | |
#charset koi8-r; | |
# access_log /var/log/nginx/log/host.access.log main; | |
if (!-e $request_filename) { | |
rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2 last; | |
rewrite ^([_0-9a-zA-Z-]+)?(/.*.php)$ $2 last; | |
rewrite ^ /index.php last; | |
} | |
location / { | |
# root /usr/share/nginx/html; | |
index index.php index.html index.htm; | |
#if (-f $request_filename/index.html){ | |
# rewrite (.*) $1/index.html break; | |
#} | |
location ~ /\. | |
{ | |
deny all; | |
} | |
#if (-f $request_filename/index.php){ | |
# rewrite (.*) $1/index.php; | |
#} | |
#if (!-f $request_filename){ | |
# rewrite (.*) /index.php; | |
#} | |
#rewrite /wp-admin$ $scheme://$host$uri/ permanent; | |
} | |
# enforce NO www | |
# if ($host ~* ^www\.(.*)) | |
#{ | |
# set $host_without_www $1; | |
# rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent; | |
#} | |
# unless the request is for a valid file, send to bootstrap | |
# if (!-e $request_filename) | |
# { | |
# rewrite ^(.+)$ /index.php?q=$1 last; | |
# } | |
error_page 404 /404.html; | |
# redirect server error pages to the static page /50x.html | |
# | |
#include wp.conf; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
# proxy the PHP scripts to Apache listening on 127.0.0.1:80 | |
# | |
#location ~ \.php$ { | |
# proxy_pass http://127.0.0.1; | |
#} | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
# | |
location ~ \.php$ { | |
root /usr/share/nginx/html; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
#$document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
# deny access to .htaccess files, if Apache's document root | |
# concurs with nginx's one | |
# | |
#location ~ /\.ht { | |
# deny all; | |
#} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to delete it? Please. I posted it by command not using my own github account