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 Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx