#1  
Old 30th December 2012, 09:22
calidan calidan is offline
Junior Member
 
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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;
}
Reply With Quote
Sponsored Links
  #2  
Old 31st December 2012, 15:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

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;
  }
}
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 31st January 2013, 17:50
onastvar onastvar is offline
Senior Member
 
Join Date: Apr 2008
Location: U.S.A.
Posts: 192
Thanks: 61
Thanked 13 Times in 13 Posts
Default

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.4p4 | Debian Wheezy | BIND | Dovecot 2.1.7 | Apache 2.2.22 | MySQL 5.5.38 | PHP 5.3.22
Reply With Quote
  #4  
Old 1st February 2013, 18:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Can you post the vhost configuration you're currently using?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 2nd February 2013, 02:03
onastvar onastvar is offline
Senior Member
 
Join Date: Apr 2008
Location: U.S.A.
Posts: 192
Thanks: 61
Thanked 13 Times in 13 Posts
Default

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.4p4 | Debian Wheezy | BIND | Dovecot 2.1.7 | Apache 2.2.22 | MySQL 5.5.38 | PHP 5.3.22

Last edited by onastvar; 2nd February 2013 at 08:10.
Reply With Quote
The Following User Says Thank You to onastvar For This Useful Post:
Williamsl (23rd July 2014)
  #6  
Old 2nd February 2013, 13:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

The root line looks wrong. It must be the absolute path, not a relative one.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 2nd February 2013, 23:31
onastvar onastvar is offline
Senior Member
 
Join Date: Apr 2008
Location: U.S.A.
Posts: 192
Thanks: 61
Thanked 13 Times in 13 Posts
Default

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 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 /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.4p4 | Debian Wheezy | BIND | Dovecot 2.1.7 | Apache 2.2.22 | MySQL 5.5.38 | PHP 5.3.22
Reply With Quote
  #8  
Old 4th February 2013, 14:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

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;
}
}
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
pvanthony (3rd July 2013)
  #9  
Old 4th February 2013, 20:41
onastvar onastvar is offline
Senior Member
 
Join Date: Apr 2008
Location: U.S.A.
Posts: 192
Thanks: 61
Thanked 13 Times in 13 Posts
Default

Falko, thanks for taking a look. Unfortunately, that didn't work any other ideas?
__________________
ISPConfig 3.0.5.4p4 | Debian Wheezy | BIND | Dovecot 2.1.7 | Apache 2.2.22 | MySQL 5.5.38 | PHP 5.3.22
Reply With Quote
  #10  
Old 3rd July 2013, 04:25
pvanthony pvanthony is offline
Member
 
Join Date: Jun 2012
Location: Singapore
Posts: 39
Thanks: 6
Thanked 5 Times in 4 Posts
Send a message via Skype™ to pvanthony
 
Default

Quote:
Originally Posted by falko View Post
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;
}
}
The above code works for me.

Thank you for sharing this.

P.V.Anthony
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.