Created
November 11, 2015 22:31
-
-
Save Tom-Alexander/465f7509806529ce4d84 to your computer and use it in GitHub Desktop.
nginx config for magneto
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
server { | |
listen 8080; | |
root /Users/user/Sites/magento.co.nz; | |
server_name magento.dev "~magento\.(.*)\.xip\.io$"; | |
fastcgi_buffer_size 128k; | |
fastcgi_buffers 4 256k; | |
fastcgi_busy_buffers_size 256k; | |
proxy_connect_timeout 90; | |
proxy_send_timeout 180; | |
proxy_read_timeout 180; | |
proxy_buffer_size 128k; | |
proxy_buffers 4 256k; | |
proxy_busy_buffers_size 256k; | |
proxy_intercept_errors on; | |
location / { | |
index index.html index.php; | |
try_files $uri $uri/ @handler; | |
} | |
location /var/export/ { | |
auth_basic "Restricted"; | |
auth_basic_user_file htpasswd; | |
autoindex on; | |
} | |
location @handler { | |
rewrite ^([^.]*[^/])$ $1/ permanent; | |
rewrite / /index.php; | |
} | |
location ~ .php/ { | |
rewrite ^([^.]*[^/])$ $1/ permanent; | |
rewrite ^(.*.php)/ $1 last; | |
} | |
location ~ .php$ { | |
expires off; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param MAGE_RUN_CODE default; | |
fastcgi_param MAGE_RUN_TYPE store; | |
include fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment