Deploying concrete5 on nginx
Posted
by
Nithin
on Server Fault
See other posts from Server Fault
or by Nithin
Published on 2012-06-27T14:43:28Z
Indexed on
2012/06/27
15:17 UTC
Read the original article
Hit count: 393
I have a concrete5 site that works 'out of the box' in apache server. However I am having a lot of trouble running it in nginx.
The following is the nginx configuration i am using:
server {
root /home/test/public;
index index.php;
access_log /home/test/logs/access.log;
error_log /home/test/logs/error.log;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ index.php;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
# pass the PHP scripts to FastCGI server listening on unix socket
#
location ~ \.php($|/) {
fastcgi_pass unix:/tmp/phpfpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
I am able to get the homepage but am having problem with the inner pages. The inner pages display an "Access denied". Possibly the rewrite is not working, in effect I think its querying and trying to execute php files directly instead of going through the concrete dispatcher.
I am totally lost here.
Thank you for your help, in advance.
© Server Fault or respective owner