Skip to content

Instantly share code, notes, and snippets.

@dakira
Created September 17, 2014 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dakira/1b3f415e626783493731 to your computer and use it in GitHub Desktop.
Save dakira/1b3f415e626783493731 to your computer and use it in GitHub Desktop.
magento nginx conf
server {
root /home/daim2k5/www/magento19.localhost;
index index.php;
server_name magento19.localhost;
location / {
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
}
location ^~ /(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
location /var/export/ { internal; }
location /. { return 404; }
location @handler { rewrite / /index.php; }
location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
location ~* .php$ {
include fastcgi_params;
##fastcgi_split_path_info ^(.+\.php)(/.+)$;
##if (!-e $request_filename) { rewrite / /index.php last; }
expires off;
fastcgi_pass unix:/var/run/php5-fpm.sock;
#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;
fastcgi_index index.php;
fastcgi_param PATH_INFO $fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment