Created
March 22, 2013 06:40
-
-
Save ariews/5219428 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 Debian 6 | |
# Nginx 1.2.7 | |
# | |
server { | |
listen 80; | |
server_name arie.malam.or.id; | |
root /opt/sites/arie.malam.or.id; | |
index index.php; | |
access_log /var/log/nginx/arie.malam.or.id-access.log; | |
error_log /var/log/nginx/arie.malam.or.id-error.log; | |
location / { | |
try_files $uri $uri/ @mybackend; | |
} | |
location ~* ^/(themes|uploads)/(.*)\.(bmp|css|doc|gif|gz|ico|jpe?g?|js|pdf|png|svg|swf|tar|tiff|zip)$ { | |
root /opt/sites/arie.malam.or.id; | |
expires 30d; | |
} | |
location ~* /(favicon.ico|robots.txt) { | |
log_not_found off; | |
access_log off; | |
expires 1y; | |
} | |
location ~ /\. { | |
deny all; | |
access_log off; | |
log_not_found off; | |
} | |
location ~* \.php$ { | |
try_files $uri $uri/ @mybackend; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location @mybackend { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root/index.php; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment