Answer the question
In order to leave comments, you need to log in
Nginx + php-fpm not finding domains?
I decided to test php-fpm. I installed
it out of the box, launched it, read habr and runet made a config for nginx. Everything works great.
Then I decided to kill php by installing chroot
chroot = /usr/webusers/<br/>
<br/>
chdir = /
localhost
). 127.0.0.1
solved the problem, but googling found a note that you need to copy some files to the chroot. [email protected]:/usr/webusers/lib# l<br/>
total 100K<br/>
-rw-r--r-- 1 root root 30K Jan 24 03:09 libnss_compat.so.2<br/>
-rw-r--r-- 1 root root 22K Jan 24 03:09 libnss_dns.so.2<br/>
-rw-r--r-- 1 root root 42K Jan 24 03:09 libnss_files.so.2<br/>
<br/>
[email protected]:/usr/webusers/etc# l<br/>
total 16K<br/>
-rw-r--r-- 1 root root 9 Aug 7 2006 host.conf<br/>
-rw-r--r-- 1 root root 286 Mar 23 01:23 hosts<br/>
-rw-r--r-- 1 root root 475 Aug 28 2006 nsswitch.conf<br/>
-rw-r--r-- 1 root root 132 Mar 21 17:57 resolv.conf
service php5-fpm restart
and even eventually restarted the server init 6
. php.ini
- increased memory to 256MB, config php-fpm
( <a href="http://www.conf">www.conf</a>
) - lines about chroot, everything else in them as is. Debian6Linux minisrv2 2.6.32-5-686-bigmem #1 SMP Tue Mar 8 22:14:55 UTC 2011 i686 GNU/Linux
chroot
'achown -R www-data:www-data etc<br/>
chown -R www-data:www-data lib
, restarted php-fpm, to no avail ... I have no idea Answer the question
In order to leave comments, you need to log in
I don't understand, the problem is that you can't connect to mysql on localhost? the easiest way is to leave 127.0.0.1 and not warm your head.
if you want blood from the nose exactly localhost, then it is obvious that in this case the connection goes through a socket, which is not in your chruta. throw mysql socket into chroot and you will be happy.
Well, like a comrade, it's time to see the access rights. If you have nginx, then user nobody is registered in the config in any way, and the rights from your ls -la to root:root.
regarding the launch:
nginx is launched not under nobody, but under usrnginx users (the user has his own group). the same user is included in the www-data group, which allows nginx to give out static that was uploaded to the server from the www-data group.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question