Skip to content

Instantly share code, notes, and snippets.

@JoaoVagner
Created December 1, 2014 18:08
Show Gist options
  • Save JoaoVagner/8516ee0caa1f0ff9e7a1 to your computer and use it in GitHub Desktop.
Save JoaoVagner/8516ee0caa1f0ff9e7a1 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name dev.mercosultextil.com.br;
access_log /var/log/nginx/loja-dev-mercosultextil-access.log main;
error_log /var/log/nginx/loja-dev-mercosultextil-error.log error;
client_max_body_size 16M;
## These locations would be hidden by .htaccess normally
location ^~ /app/ { deny all; }
location ^~ /includes/ { deny all; }
location ^~ /lib/ { deny all; }
location ^~ /media/downloadable/ { deny all; }
location ^~ /pkginfo/ { deny all; }
location ^~ /report/config.xml { deny all; }
location ^~ /var/ { deny all; }
location / {
root /web/dev/magento;
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d; ## Assume all files are cachable
}
location @handler {
rewrite / /index.php;
}
location ~ .php/ {
rewrite ^(.*.php)/ $1 last;
}
location ~ .php$ {
expires off;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_param SCRIPT_FILENAME /web/dev/magento$fastcgi_script_name;
fastcgi_param MAGE_IS_DEVELOPER_MODE 1;
fastcgi_param MAGE_RUN_CODE dev_mercosultextil_com_br;
fastcgi_param MAGE_RUN_TYPE website;
include fastcgi_params;
}
}
server {
listen 80;
server_name dev.vidatextil.com.br;
access_log /var/log/nginx/loja-dev-vidatextil.com.br-access.log main;
error_log /var/log/nginx/loja-dev-vidatextil.com.br-error.log error;
client_max_body_size 16M;
## These locations would be hidden by .htaccess normally
location ^~ /app/ { deny all; }
location ^~ /includes/ { deny all; }
location ^~ /lib/ { deny all; }
location ^~ /media/downloadable/ { deny all; }
location ^~ /pkginfo/ { deny all; }
location ^~ /report/config.xml { deny all; }
location ^~ /var/ { deny all; }
location / {
root /web/dev/magento;
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d; ## Assume all files are cachable
}
location @handler {
rewrite / /index.php;
}
location ~ .php/ {
rewrite ^(.*.php)/ $1 last;
}
location ~ .php$ {
expires off;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /web/dev/magento$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE dev_vidatextil_com_br;
fastcgi_param MAGE_RUN_TYPE website;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment