Created
August 11, 2017 19:25
-
-
Save melihovv/b95ef51bb8e4f5e0d1c624624765023d to your computer and use it in GitHub Desktop.
Nginx config for yioop
This file contains hidden or 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 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