Unable to use CHIVE MySQL database management tool

Currently use linode server. Ubuntu 10.04, nginx 0.8.52, PHP-fpm,

I try to create subdomain for Chive. but it doesn’t to work. Cant access
database at all. When i try with SQL buddy it work but my boss like
Chive better. Any idea what wrong? Below is my subdomain.conf

server {
listen 80;
server_name subdomain.com;
access_log /srv/www/subdomain.com/logs/access.log;
error_log /srv/www/subdomain.com/logs/error.log;

location / {
root   /srv/www/subdomain.com/public_html;
    index    index.html index.htm index.php;
}

location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/srv/www/subdomain.com/public_html$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}

Posted at Nginx Forum:

On Fri, Oct 15, 2010 at 04:17:27AM -0400, spacereactor wrote:

Hi there,

I try to create subdomain for Chive. but it doesn’t to work. Cant access
database at all.

What does “doesn’t work” mean?

Do you see a HTTP 500 error, or a HTTP 404 error, or something else?

When I un-tar the chive distribution,

curl -i http://localhost/chive

gives a 301 redirect to http://localhost/chive/, and then

curl -i http://localhost/chive/

gives a 301 redirect to http://localhost/chive/index.php/site/login,
and then using something like your config

curl -i http://localhost/chive/index.php/site/login

gives a 404 error, which I guess is what you see?

The 404 is because “location ~ .php$” does not match requests which
include a PATH_INFO part (anything after .php that does not start with
“?”).

location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/srv/www/subdomain.com/public_html$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

When I switch to using a config like

    location ~ ^/chive/.*\.php(/|$) {
            fastcgi_split_path_info (.*\.php)(.*);
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_param  SCRIPT_FILENAME 

$document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}

then accessing http://localhost/chive still brings me to
http://localhost/chive/index.php/site/login, but this time it shows a
“login” form asking for a username and password.

I haven’t tried accessing a database yet, but maybe the config above
will help you to get further.

Good luck with it,

f

Francis D. [email protected]

I have
rewrite for chive
If u want i give u
2010/10/15 Francis D. [email protected]

On Fri, Oct 15, 2010 at 11:51:55AM +0100, Francis D. wrote:

On Fri, Oct 15, 2010 at 04:17:27AM -0400, spacereactor wrote:

Hi there,

I try to create subdomain for Chive. but it doesn’t to work. Cant access
database at all.

[…]

I haven’t tried accessing a database yet, but maybe the config above
will help you to get further.

Oh, and before you expose this to the world, you should incorporate at
least the protections that the chive distribution does for apache. I see
four .htaccess files which say “deny from all”, plus one which includes
some RewriteRule lines.

So there’s almost certainly more configuration needed before everything
works sanely.

All the best,

f

Francis D. [email protected]

it will be very helpful you can post the rewrite for chive here. I think
i not the only one looking for solution.

Posted at Nginx Forum:

i add in the below code for deny all but not sure if is correct or not.
I also remove 3 .htaccess file from chive folder, yii folder and
protected folder

location ~* ^/srv/www/SUBDOMAIN/public_html/yii {
deny all;
}

location ~* ^/srv/www/SUBDOMAIN/public_html/protected {
deny all;
}

Posted at Nginx Forum:

Below is my conf for my SUBDOMAIN, just replace your SUBDOMAIN to you
own sub domain. I haven’t figure out the part to “deny from all” and
access with https. It will helpful if others can chip in too. Thank

server {
listen 80;
server_name SUBDOMAIN;
root /srv/www/SUBDOMAIN/public_html;
access_log /srv/www/SUBDOMAIN/logs/access.log;
error_log /srv/www/SUBDOMAIN/logs/error.log;
index index.php;

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
log_not_found off;
expires 30d;
}

location ~ .php(/|$) {
fastcgi_split_path_info ^(.+.php)(.*)$;
fastcgi_pass localhost:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}

Posted at Nginx Forum: