
30th December 2012, 08:22
|
|
Junior Member
|
|
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
concrete5 and Nginx
I am setting up concrete5 with nginx and I'm running into an issue with it being in a subdirectory instead of vhost. The error I'm getting is: concrete5 cannot parse the PATH_INFO or ORIG_PATH_INFO information provided by your server.
I have the following setup in my location. Am I missing something? Thanks
location ~ /concrete5/.*\.php$ { try_files $uri =404; include fastcgi_params; fastcgi_pass php5-fpm-sock; fastcgi_index index.php; set $script $uri; set $path_info "/concrete5/"; if ($uri ~ "^(.+\.php)(/.+)") { set $script $1;
set $path_info $2;
} fastcgi_param URI $uri; fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_NAME $script; fastcgi_param SCRIPT_FILENAME $document_root$script; }
|

31st December 2012, 14:05
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Can you try this instead?
Code:
location /concrete5 {
root /path/to/concrete5;
index index.html index.htm index.php;
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php/$1 last;
}
location ~ \.php($|/) {
try_files $uri =404;
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_pass unix:php5-fpm-sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param URI $uri;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param SCRIPT_FILENAME /path/to/concrete5$script;
}
}
|

31st January 2013, 16:50
|
|
Senior Member
|
|
Join Date: Apr 2008
Location: U.S.A.
Posts: 153
Thanks: 44
Thanked 7 Times in 7 Posts
|
|
Hi Falko,
I tried your suggestion, I'm unable to install Concrete5, I'm getting a red stop sign
"Supports concrete5 request URLs"
I'm unable to proceed with Concrete5 installation. Any ideas where and how I could start investigating the issue?
Thank You
__________________
ISPConfig 3.0.5.1 | Debian Squeeze with BIND, Dovecot 1.2.15 & Apache 2.2.16
|

1st February 2013, 17:22
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Can you post the vhost configuration you're currently using?
|

2nd February 2013, 01:03
|
|
Senior Member
|
|
Join Date: Apr 2008
Location: U.S.A.
Posts: 153
Thanks: 44
Thanked 7 Times in 7 Posts
|
|
nginx Directives
Code:
location / {
try_files $uri $uri/ /index.php?$args;
}
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}
# Deny public access to wp-config.php
location ~* wp-config.php {
deny all;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param HTTPS $fastcgi_https; # <-- add this line
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
# Support Clean (aka Search Engine Friendly) URLs</tt>
location /demo/joomla/ {
try_files $uri $uri/ /demo/joomla/index.php?q=$request_uri;
}
when I add the following code to above Nginx Directives I get 404 Not Found
Code:
location /demo/concrete5 {
root /demo/concrete5;
index index.html index.htm index.php;
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php/$1 last;
}
location ~ \.php($|/) {
try_files $uri =404;
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_pass unix:php5-fpm-sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param URI $uri;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param SCRIPT_FILENAME /demo/concrete/concrete5$script;
}
}
__________________
ISPConfig 3.0.5.1 | Debian Squeeze with BIND, Dovecot 1.2.15 & Apache 2.2.16
Last edited by onastvar; 2nd February 2013 at 07:10.
|

2nd February 2013, 12:13
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
The root line looks wrong. It must be the absolute path, not a relative one.
|

2nd February 2013, 22:31
|
|
Senior Member
|
|
Join Date: Apr 2008
Location: U.S.A.
Posts: 153
Thanks: 44
Thanked 7 Times in 7 Posts
|
|
This is my full NGINX Directives, I still get "Supports concrete5 request URLs" when trying to install Concrete5.
Quote:
location /demo/concrete5 {
root /var/www/clients/client0/web2/web/demo/concrete5;
index index.html index.htm index.php;
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php/$1 last;
}
location ~ \.php($|/) {
try_files $uri =404;
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_pass unix hp5-fpm-sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param URI $uri;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param SCRIPT_FILENAME /demo/concrete/concrete5$script;
}
}
location / {
try_files $uri $uri/ /index.php?$args;
}
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}
# Deny public access to wp-config.php
location ~* wp-config.php {
deny all;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param HTTPS $fastcgi_https; # <-- add this line
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
# Support Clean (aka Search Engine Friendly) URLs</tt>
location /demo/joomla/ {
try_files $uri $uri/ /demo/joomla/index.php?q=$request_uri;
}
location /webmail/
if ($http_host != "www.mydomain.com") {
rewrite ^ http://mydomain.com/webmail$request_uri permanent;
}
index index.php index.html;
location ~ ^/favicon.ico$ {
root /var/www/clients/client0/web2/web/webmail/skins/default/images;
log_not_found off;
access_log off;
expires max;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
deny all;
}
location ~ ^/(bin|SQL)/ {
deny all;
}
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
}
}
|
__________________
ISPConfig 3.0.5.1 | Debian Squeeze with BIND, Dovecot 1.2.15 & Apache 2.2.16
|

4th February 2013, 13:01
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Try
Code:
location /demo/concrete5 {
root /var/www/clients/client0/web2/web/demo/concrete5;
index index.html index.htm index.php;
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /demo/concrete5/index.php/$1 last;
}
location ~ \.php($|/) {
try_files $uri =404;
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_pass unixhp5-fpm-sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param URI $uri;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param SCRIPT_FILENAME $document_root$script;
}
}
|

4th February 2013, 19:41
|
|
Senior Member
|
|
Join Date: Apr 2008
Location: U.S.A.
Posts: 153
Thanks: 44
Thanked 7 Times in 7 Posts
|
|
Falko, thanks for taking a look. Unfortunately, that didn't work  any other ideas?
__________________
ISPConfig 3.0.5.1 | Debian Squeeze with BIND, Dovecot 1.2.15 & Apache 2.2.16
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 07:40.
|
|
Recent comments
1 day 5 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 14 hours ago
1 day 18 hours ago
1 day 19 hours ago
1 day 21 hours ago
2 days 10 hours ago
2 days 12 hours ago