I am porting a PHP site from an Apache server too a NGINX server. First I will get rid of apache to avoid any problems:
# service httpd stop
# yum erase httpd*
Now I am going to install php-fpm so I can extend php functions through NGINX:
# yum install php-fpm
Let's make sure php-fpm is running under the right user:
# ps aux | grep apache
apache 1658 0.0 0.5 222552 5316 ? S 20:41 0:00 php-fpm: pool www
apache 1659 0.0 1.0 227268 10536 ? S 20:41 0:00 php-fpm: pool www
apache 1660 0.0 1.0 227268 10420 ? S 20:41 0:00 php-fpm: pool www
apache 1661 0.0 1.0 227268 10420 ? S 20:41 0:00 php-fpm: pool www
apache 1662 0.0 0.5 222552 5316 ? S 20:41 0:00 php-fpm: pool www
Nope... so what if:
# vi /etc/php-fpm.d/www.conf
# service php-fpm restart
# ps aux | grep nginx
nginx 2379 0.0 0.3 222264 3504 ? S 21:47 0:00 php-fpm: pool www
nginx 2380 0.0 0.3 222264 3504 ? S 21:47 0:00 php-fpm: pool www
nginx 2381 0.0 0.3 222264 3504 ? S 21:47 0:00 php-fpm: pool www
nginx 2382 0.0 0.3 222264 3504 ? S 21:47 0:00 php-fpm: pool www
nginx 2383 0.0 0.3 222264 3508 ? S 21:47 0:00 php-fpm: pool www
Fantastic... Let's see what happens when I invoke a mail() call from my app:
postfix/pickup[2305]: 6B9B6223BD: uid=497 from=<nginx>
postfix/cleanup[2393]: 6B9B6223BD: message-id=<20130318014941.6B9B6223BD@penny.localdomain>
postfix/qmgr[2306]: 6B9B6223BD: from=<nginx@penny.localdomain>, size=367, nrcpt=1 (queue active)
postfix/smtp[2396]: connect to gmail-smtp-in.l.google.com[173.194.75.26]:25: Connection timed out
postfix/smtp[2396]: connect to alt1.gmail-smtp-in.l.google.com[173.194.65.26]:25: Connection timed out
postfix/smtp[2396]: connect to alt2.gmail-smtp-in.l.google.com[173.194.70.27]:25: Connection timed out
postfix/smtp[2396]: connect to alt3.gmail-smtp-in.l.google.com[173.194.69.27]:25: Connection timed out
postfix/smtp[2396]: connect to alt4.gmail-smtp-in.l.google.com[173.194.71.26]:25: Connection timed out
postfix/smtp[2396]: 6B9B6223BD: to=<myemail@gmail.com>, relay=none, delay=151, delays=0.03/0.01/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[173.194.71.26]:25: Connection timed out)
So can my box actually figure out how to reach gmail?
# host -t mx gmail.com
gmail.com mail is handled by 20 alt2.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 30 alt3.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 40 alt4.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
It sure can.. hummm..
Let me note this is a guest Centos 6.3 VM running locally.
The problem is that I am not able to deliver mail using the current configuration.
I'm not sure what to do next at this point, any guidance would be appreciated.
#curl google.com#ping google.comI even#yum erase php*#yum install php php-fpmand went through the bases one more time. There must be more to this. – Dan Kanze Mar 18 at 2:35telnet gmail-smtp-in.l.google.com 25? – Josh Mar 18 at 13:59