Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # The default server
- #
- server {
- listen 80 default_server;
- server_name 213.165.xx.xx;
- #charset koi8-r;
- #access_log logs/host.access.log main;
- # Load configuration files for the default server block.
- include /etc/nginx/default.d/*.conf;
- location / {
- root /var/www/wordpress;
- index index.html index.htm index.php;
- try_files $uri $uri/ /index.php?q=$request_uri;
- }
- location /admin {
- auth_basic "Administrator Login";
- auth_basic_user_file /var/www/admin/.htpasswd;
- }
- #!!! IMPORTANT !!! We need to hide the password file from prying eyes
- # This will deny access to any hidden file (beginning with a .period)
- location ~ /\. { 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;
- }
- # 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 /var/www/wordpress;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $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;
- #}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement