Posted by Chipie on August 18, 2010 at 12:55pm
Hi,
I hope this is the right place to ask this question. I have switched from apache to nginx by using the config files from yhager on http://github.com/yhager/nginx_drupal. When accessing the site, I am redirected to install.php. How can I enable logging in order to track down the problem? Any help is appreciated.
Regards
Stéphane
Comments
To enable debugging you need
To enable debugging you need a version of nginx compiled with debugging. I know the Ubuntu official repo version has it enabled. You can check by doing "nginx -V" and looking for "--with-debug".
Then you put a line "debug_connection 192.168.1.102;" in your /etc/nginx/nginx.conf file with your current IP address. http://www.whatismyip.com/
Then restart nginx. All the debugging info will go by default to your error.log file. You can trace the steps there. You probably want to # out the debug_connection line after because the log file can get large quickly if you access your own site much.
If you want help tracing the issue, you can post your configs here. (with identifying info redacted)
Thank you for the prompt
Thank you for the prompt reply. I have enabled debugging. Here is the output:
Why is the browser redirected to the install.php? How can I debug php-cgi?
Redirect to install.php
Odds are the permissions for your settings.php file is not readable from nginx or php depending on how you have it setup. I would check permissions
I have set the permissions
I have set the permissions for testing to 777 for all files unter sites/site and got got the same result. Could be there another reason, why php-cgi cannot access settings.php? How can I debug php-cgi?
I experienced similar things
when switching from the Apache-php-as-a-module setup to nginx. This seems to be a permissions issue. Like mikeytown2 says above.
Remove the 777 permissions settings. Drupal files are not executables. I would venture that the problem is in some directory that nginx is not allowed to access due to incorrect permissions. At least that's where my problems were. Specifically nginx was not reading the settings.php hence when hitting index.php Drupal thought: "hmmm, no settings.php, I guess I need to be installed first."
safe_mode = off
Changing the file permissions did not help. After I set "safe_mode = off;" in the php.ini, everything worked fine.
deleted
deleted
I had a similar issue with my
I had a similar issue with my aegir/hostmaster setup. I have nginx and php-fpm running under the user www-data. After giving the group www-data read access to the Drupal core, the issue was resolved.
chgrp -R www-data hostmaster-6.x-1.3
Searching for a solution I
Searching for a solution I stumbled onto this page
I have nginx running on my macbook and also getting a 403 forbidden.
Changing the permissions of settings.php to 444 or even 004 solves my problem.
I also have hostmaster (aegir) installed. It automatically sets permissions to 440 to the following :
sites/example.ldev/settings.php
sites/example.ldev/files
sites/example.ldev/private
User and group of the above are "myuser" and "_www"
My nginx.conf I have set : user myuser _www;
Hope someone can help.
Cheers
What user is php running as?
What user is php running as?
Bows to you
I'm running php-fpm. I had modified the config file, but apparently php-fpm was using ANOTHER config file. What a dummy!
I've added a symlink. Works like a charm.
Thanks so much!!!!!!