On February 22, 2012 3:25 , Ralph Lawrence <ralphlaw@xxxxxxxxx> wrote:
Does anyone have a working mod_proxy_fcgi plus php-fpm configuration that they can share?
Example 1: <Location /test/> ProxyPass fcgi://127.0.0.1:9000/www/php-ssl/ ProxyErrorOverride on Require all granted </Location> This would be equivalent to the following, which I am not using: ProxyPass /test fcgi://127.0.0.1:9000/www/php-ssl/ Example 2: Alias /wp3 /www/wp3/wordpress <Directory /www/wp3/wordpress> # WordPress permalinks: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-dRewriteRule . fcgi://127.0.0.1:9003/www/wp3/wordpress/index.php [P,L]
# Serve PHP through php-fpm:RewriteRule ^/?(.*\.php)$ fcgi://127.0.0.1:9003/www/wp3/wordpress/$1 [P,L]
RewriteCond %{REQUEST_FILENAME} -dRewriteRule ^/?(.*)$ fcgi://127.0.0.1:9003/www/wp3/wordpress/$1 [P,L]
# General stuff: DirectoryIndex disabled Require all granted ProxyErrorOverride on </Directory>
I don't have further cgi configuration options in my httpd.conf. Do I need others? What should my AddHandler be for instance?
Since the above configurations are using proxies, not handlers, I do not have any AddHandler directive. You do need an AddHandler directive if you are using mod_fcgid instead of mod_proxy_fcgi, however.
I looked through my configuration and did not see any other directives that are relevant for the above examples.
php-fpm seems go get the request but but debug messages show... [...] WARNING:..., fpm_stdio_child_said(), line 166: [pool www] child 18270 said into stderr: "DEBUG: main(), line 1816: Primary script unknown" ...every time I access my domain root. And the browser displays just one line... "File not found." I'd just like a simple PHP script to execute or at least be able to view a static text file. But I got the "File not found" error no matter what I try.
I've had problems with the way PHP's FastCGI SAPI determines the path for the script. I'm still running an old version of PHP that I've patched to solve my specific problems, though. Try the examples I give above and if you still have errors, ask about the problem again -- I might be able to update to the newest versions and then give you some better advice.
-- Mark Montague mark@xxxxxxxxxxx --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx