Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name your.domain.name;
- #charset koi8-r;
- access_log /path/to/log/access.log main;
- error_log /path/to/error/log/error.log;
- root /path/to/directory/root;
- index index.php index.html;
- location / {
- try_files $uri $uri/ /index.php;
- if (-e $request_filename) {
- break;
- }
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php?q=$1 last;
- }
- }
- error_page 404 /404.html;
- location = /404.html {
- root /usr/share/nginx/html;
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/html;
- }
- location ~ \.php$ {
- #root html;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~ /\.ht {
- deny all;
- }
- location /favicon.ico { access_log off; error_log off; }
- location /robots.txt { access_log off; error_log off; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement