# Unable to use CHIVE MySQL database management tool

**URL:** <https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499>\
**Category:** NGINX\
**Created:** [October 15, 2010, 10:18am UTC](https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499 "2010-10-15T10:18:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [October 15, 2010, 10:18am UTC](https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499/1 "2010-10-15T10:18:57Z")

</div>

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](http://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:

> **[Unable to use CHIVE MySQL database management tool](https://forum.nginx.org/read.php?2,140870,140870#msg-140870)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![spacereactor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@spacereactor](https://www.ruby-forum.com/u/spacereactor)\
**Post date:** [October 15, 2010, 12:53pm UTC](https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499/2 "2010-10-15T12:53:03Z")

</div>

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](http://localhost/chive)

gives a 301 redirect to [http://localhost/chive/](http://localhost/chive/), and then

curl -i [http://localhost/chive/](http://localhost/chive/)

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

curl -i [http://localhost/chive/index.php/site/login](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](http://localhost/chive) still brings me to  
[http://localhost/chive/index.php/site/login](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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![spacereactor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@spacereactor](https://www.ruby-forum.com/u/spacereactor)\
**Post date:** [October 15, 2010, 1:57pm UTC](https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499/3 "2010-10-15T13:57:36Z")

</div>

I have  
rewrite for chive  
If u want i give u  
2010/10/15 Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![spacereactor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@spacereactor](https://www.ruby-forum.com/u/spacereactor)\
**Post date:** [October 15, 2010, 1:33pm UTC](https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499/4 "2010-10-15T13:33:48Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![spacereactor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@spacereactor](https://www.ruby-forum.com/u/spacereactor)\
**Post date:** [October 15, 2010, 10:39pm UTC](https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499/5 "2010-10-15T22:39:31Z")

</div>

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:

> **[Re: Unable to use CHIVE MySQL database management tool](https://forum.nginx.org/read.php?2,140870,140947#msg-140947)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![spacereactor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@spacereactor](https://www.ruby-forum.com/u/spacereactor)\
**Post date:** [October 18, 2010, 8:46am UTC](https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499/6 "2010-10-18T08:46:30Z")

</div>

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:

> **[Re: Unable to use CHIVE MySQL database management tool](https://forum.nginx.org/read.php?2,140870,141783#msg-141783)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![spacereactor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@spacereactor](https://www.ruby-forum.com/u/spacereactor)\
**Post date:** [October 18, 2010, 6:34am UTC](https://www.ruby-forum.com/t/unable-to-use-chive-mysql-database-management-tool/197499/7 "2010-10-18T06:34:09Z")

</div>

# 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:  
[http://forum.nginx.org/read.php?2,140870,141763#msg-141763](http://forum.nginx.org/read.php?2,140870,141763#msg-141763)
