Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- # some configs
- location = / {
- index index.html;
- fastcgi_index index.html;
- }
- or
- location / {
- index index.html;
- fastcgi_index index.html;
- }
- }
- location ~ .*(css|htc|js|bmp|jp?g|gif|ico|cur|png|swf|htm?|html)$ {
- access_log off;
- root $www_root;
- }
- location ~ .php$
- {
- include /etc/nginx/fastcgi_params;
- index index.html;
- fastcgi_index index.html;
- fastcgi_param SCRIPT_FILENAME $www_root$fastcgi_script_name;
- fastcgi_param QUERY_STRING $query_string;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_pass 127.0.0.1:9000;
- # Директива определяет что ответы FastCGI-сервера с кодом больше или равные 400
- # перенаправлять на обработку nginx'у с помощью директивы error_page
- fastcgi_intercept_errors on;
- break;
- }
- location ~ /.ht {
- deny all;
- }
- location / {
- try_files $uri $uri/index.html;
- }
- root /srv/www/ducklington.org/public_html;
- location = / {
- index index.html;
- location = /index.html {
- root /www/my-root;
- # http://example.org
- # = means exact location
- location = / {
- try_files /index.html =404;
- }
- # disable http://example.org/index as a duplicate content
- location = /index { return 404; }
- # This is a general location.
- # (e.g. http://example.org/contacts <- contacts.html)
- location / {
- # use fastcgi or whatever you need here
- # return 404 if doesn't exist
- try_files $uri.html =404;
- }
- error_log /var/log/nginx/debug.log debug;
- location / {
- try_files $uri $uri/index.html index.html;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement