Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name sitename.com;
- access_log /usr/share/nginx/sitename.com/logs/access.log;
- error_log /usr/share/nginx/sitename.com/logs/error.log;
- location / {
- root /usr/share/nginx/sitename.com;
- index index.php index.html index.htm;
- if (-f $request_filename) {
- expires 30d;
- break;
- }
- if (!-e $request_filename) {
- rewrite ^(.+)$ /index.php?q=$1 last;
- }
- }
- location ~ .php$ {
- fastcgi_pass localhost:9000; # port where FastCGI processes were spawned
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/share/nginx/sitename.com$fastcgi_script_name; # same path as above
- fastcgi_param PATH_INFO $fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement