Created
February 18, 2012 23:22
-
-
Save zrod/1861309 to your computer and use it in GitHub Desktop.
Magento - nginx config
This file contains 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
# Magento | |
server { | |
listen 80; | |
server_name store; | |
error_log /var/log/nginx/store.error_log; | |
root /home/rod/www/magento; | |
index index.php; | |
location / { | |
try_files $uri $uri/ /index.php?$uri&$args; | |
} | |
location ~* "^.+\.(jpe?g|gif|css|png|js|ico|pdf|zip|tar|t?gz|mp3|wav|swf)$" { | |
expires max; | |
add_header Cache-Control public; | |
} | |
location ~* ^(/downloader|/js|/404|/report)(.*) { | |
include fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$1/index.php$1; | |
fastcgi_read_timeout 600; | |
fastcgi_pass 127.0.0.1:9000; | |
} | |
location ~* \.php { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_read_timeout 600; | |
fastcgi_pass 127.0.0.1:9000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment