Hi all,
I have a dedicated server setup with lighttpd and able to serve static files. I have PHP installed with php-fpm. I have edited the .conf files to listen to a UNIX socket. When I request a .php file, the server returns a 403 forbidden error. It must be a fastcgi/php-fpm problem since lighttpd is able to serve static files. Below is a portion of the output from [CMD=]sockstat -u -4[/CMD]. I have set file permissions correctly as well.
This is a portion of the configuration files. I kept the same filename even though I'm not using spawn-cgi. The modules are enabled accordingly. Followed the documentations from the lighttpd website and other sources on the internet.
fastcgi.conf
php-fpm.conf
Anyone see what I am doing wrong? Thanks in advance. If you require full configuration files or more information, I am more than happy to provide it. Countless hours and energy drinks were not able to help me.
-Einthusan
I have a dedicated server setup with lighttpd and able to serve static files. I have PHP installed with php-fpm. I have edited the .conf files to listen to a UNIX socket. When I request a .php file, the server returns a 403 forbidden error. It must be a fastcgi/php-fpm problem since lighttpd is able to serve static files. Below is a portion of the output from [CMD=]sockstat -u -4[/CMD]. I have set file permissions correctly as well.
Code:
www lighttpd 1231 4 tcp6 *:80 *:*
www lighttpd 1231 5 tcp4 *:80 *:*
www lighttpd 1231 8 tcp4 173.193.223.xxx:80 74.12.36.xxx:61336
www php-fpm 1161 0 stream /tmp/php-fpm.sock
www php-fpm 1160 0 stream /tmp/php-fpm.sock
www php-fpm 1159 0 stream /tmp/php-fpm.sock
www php-fpm 1158 0 stream /tmp/php-fpm.sock
www php-fpm 1157 0 stream /tmp/php-fpm.sock
www php-fpm 1156 0 stream /tmp/php-fpm.sock
www php-fpm 1155 0 stream /tmp/php-fpm.sock
www php-fpm 1154 0 stream /tmp/php-fpm.sock
www php-fpm 1153 0 stream /tmp/php-fpm.sock
www php-fpm 1152 0 stream /tmp/php-fpm.sock
www php-fpm 1151 0 stream /tmp/php-fpm.sock
www php-fpm 1150 0 stream /tmp/php-fpm.sock
www php-fpm 1149 0 stream /tmp/php-fpm.sock
www php-fpm 1148 0 stream /tmp/php-fpm.sock
www php-fpm 1147 0 stream /tmp/php-fpm.sock
www php-fpm 1146 0 stream /tmp/php-fpm.sock
www php-fpm 1145 0 stream /tmp/php-fpm.sock
www php-fpm 1144 0 stream /tmp/php-fpm.sock
www php-fpm 1143 0 stream /tmp/php-fpm.sock
www php-fpm 1142 0 stream /tmp/php-fpm.sock
root php-fpm 1134 4 stream -> ??
root php-fpm 1134 5 stream -> ??
root php-fpm 1134 6 stream /tmp/php-fpm.sock
This is a portion of the configuration files. I kept the same filename even though I'm not using spawn-cgi. The modules are enabled accordingly. Followed the documentations from the lighttpd website and other sources on the internet.
fastcgi.conf
Code:
fastcgi.server = ( ".php" =>
(( "socket" => "/tmp/php-fpm.sock",
"bin-path" => "/usr/local/bin/php-cgi",
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "16",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"max-procs" => 5,
"bin-copy-environment" => ( "PATH", "SHELL", "USER" ),
"broken-scriptfilename" => "enable"
))
)
php-fpm.conf
Code:
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/UNIX/socket' - to listen on a UNIX socket.
; Note: This value is mandatory.
listen = /tmp/php-fpm.sock
Anyone see what I am doing wrong? Thanks in advance. If you require full configuration files or more information, I am more than happy to provide it. Countless hours and energy drinks were not able to help me.
-Einthusan