Created
February 11, 2025 11:36
-
-
Save hissy/0fb2f801981da9d86e7a240d13648203 to your computer and use it in GitHub Desktop.
[Concrete CMS] nginx conf to run Concrete CMS on subdirectory
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
location ^~ /sub { | |
## Try to find a file with given URL, if not pass to Concrete | |
try_files $uri $uri/ /sub/index.php?$query_string; | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi.conf; | |
fastcgi_split_path_info ^(/sub)(/.*)$; | |
fastcgi_param SCRIPT_NAME /sub/index.php; | |
fastcgi_param SCRIPT_FILENAME $realpath_root/sub/index.php; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment