Created
May 26, 2016 07:02
-
-
Save didats/20960961526fc8a41cbaa5adb79b4169 to your computer and use it in GitHub Desktop.
Silex under subcategory with Nginx
This file contains 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
location /your_subdirectory { | |
alias /var/www/html/your_subdirectory/web; | |
index index.php index.html; | |
if (-f $request_filename) { | |
break; | |
} | |
rewrite ^(.*)$ /your_subdirectory/index.php last; | |
} | |
location ~ /your_subdirectory/(.+)\.php(/|$) { | |
set $script $uri; | |
if ($uri ~ "/your_subdirectory/(.+\.php)(/|$)") { | |
set $script $1; | |
} | |
include /etc/nginx/fastcgi_params; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
fastcgi_pass 127.0.0.1:9002; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root/your_subdirectory/web/$script; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment