Skip to content

Instantly share code, notes, and snippets.

@martiis
Last active August 29, 2015 14:27
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 martiis/bf005da4350d580ebcfa to your computer and use it in GitHub Desktop.
Save martiis/bf005da4350d580ebcfa to your computer and use it in GitHub Desktop.
Nginx configuration for OXID eCommerce
server {
listen 80;
server_name oxid.dev www.oxid.dev;
root /var/www/oxid;
index index.php index.html;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ (/\.|EXCEPTION_LOG\.txt|\.log$|\.tpl$|pkg.rev) {
deny all;
}
location ~ /out/pictures/.*(\.jpg|\.gif|\.png)$ {
try_files $uri /core/utils/getimg.php;
}
location ~ ^/(admin|setup)/?$ {
}
location ~ /(core|export|modules|out|tmp|views)/ {
}
location / {
try_files $uri $uri/ /oxseo.php$is_args$args;
}
location ~ /oxseo.php(/|$) {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ \.php(/|$) {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
error_log /var/log/nginx/oxid.dev.error.log;
access_log /var/log/nginx/oxid.dev.access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment