Skip to content

Instantly share code, notes, and snippets.

@melihovv
Created August 11, 2017 19:25
Show Gist options
  • Save melihovv/b95ef51bb8e4f5e0d1c624624765023d to your computer and use it in GitHub Desktop.
Save melihovv/b95ef51bb8e4f5e0d1c624624765023d to your computer and use it in GitHub Desktop.
Nginx config for yioop
server {
listen 80 default_server;
listen [::]:80 default_server;
root /path/to/yioop;
index index.php;
server_name yioop.loc;
location / {
rewrite "^/wd/(css|scripts|locale)/(.*)$" /work_directory/app/$1/$2 break;
rewrite "^/wd/resources/(.*)/(.*)/(.*)/(.*)/(.*)$" /index.php?c=resource&a=get&f=resources&$1&g=$2&p=$3&sf=$4&n=$5 break;
rewrite "^/wd/resources/(.*)/(.*)/(.*)/(.*)$" /index.php?c=resource&a=get&f=resources&$1&g=$2&p=$3&n=$4 break;
rewrite "^/(css|resources|scripts|locale)/(.*)$" /src/$1/$2 break;
rewrite "^/((.*)bar.xml|favicon.ico|robots.txt)$" /src/$1 break;
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment