Tag Info

New answers tagged

3

Your server block doesn't have a root directive defined. Instead it seems to be in one of your location blocks. This is one of the most common nginx mistakes. Move it under the server block instead.


1

The log is being written to ./var/log/upstart/php5-fpm.log This was ridiculously annoying to find. Thanks to Luigi (in the comments) for pointing this out.


1

Check the upstart job pre-start section content in /etc/init/php5-fpm.conf.


1

I've found the root cause of the problem. After the php update, the apc extension I have in my php.ini was no longer working, all its all right now after commenting this line: extension=apc.so Hope it helps.


2

/usr/share/nginx/... is where the default webroot is; you may have set something to be "on" and accidentally touched that file. Since your test works, it may also have been resolved, but when nginx crashes (or things like kill -9) it doesn't get rid of its pid file. I don't have experience with php-fpm, but it appears your nginx master process isn't ...


3

PHP-FPM doesn't (as far as I know) speak http, it speaks fastcgi. A web browser therefore can't talk to it directly -- you need to have something like nginx in between to convert http requests to fastcgi requests.


2

That's because nginx serves a request from one matching location block, not multiple. Also, nginx has a specific process to choose it, read my answer on a similar question or read the official documentation for the details. I'm guessing that you are also using the index directive somewhere to tell nginx to serve an index.php file when entering tools ...


0

Your DMZ should look like figure 6 from the below link. You should only have one firewall with a DMZ on a separate link/ vlan / and not routable to your internal except my specific IPs DMZ ^ | v INTERNET <------------> FireWall <---------->Internal Network ...


1

I posted the question and shortly after that I found answer in another post Apache and multiple PHP-FPM pools The code didn't work for me 100% but it showed me the right way to do it. This code didn't work for me: <FilesMatch \.php$> SetHandler php-script </FilesMatch> So my code is simply: AddHandler php5-fcgi .php I included this ...


0

try put move line include fastcgi_params; from the last to the first in block location ~ \.php$ { becuase it will reload default params so your customized param will be replaced


1

Your location ~ \.php$ has root /home/user/www, which is unnecessary, since the same root is already defined on the server level. The definition also misses the semicolon. So, remove the extra root definition and see if it helps.


0

I use such configuration, wish it could help you. It works in OS X. As for me, @Xosofox 's answer worked. I mistyped the version of nginx 1.6.2 as 1.2.6, so that the root became a non-existing directory. location ~ \.php$ { fastcgi_intercept_errors on; root /usr/local/Cellar/nginx/1.6.2/html; fastcgi_pass 127.0.0.1:9000; ...


0

I recently encountered this same issue. It turns out that another process was already listening on the same port. To discover which process was running, I ran the following command: sudo netstat -nltp Turns out that hhvm was already listening on port 9000. tcp6 0 0 :::9000 :::* LISTEN 17765/hhvm ...


0

You probably want to set up a web server as proxy. Let it decide which requests should be routed to a PHP-module and which ones should be routed to the Python/WSGI application.


0

It's probably related to an invalid status header I had the same issue when an exception is thrown without a http status code as exception code it will fail: Hopefully it's merged soon ;) you can patch it manually for the time being: https://github.com/joomla/joomla-cms/compare/staging...Mech7:fix-nginx-status?expand=1


1

First, you are making the non-www to www redirect in a too complicated way. You should do it like this: server { listen 443 ssl spdy; server_name example.com; ssl_certificate /etc/ssl/example.com/certificate/join-cert.crt; ssl_certificate_key /etc/ssl/example.com/server-key/ssl.key; return 301 https://www.example.com$request_uri; } ...


0

If you want to make nginx send a 404 whenever it would otherwise have sent a 403, that's done with error_page: server { root /var/www/example.com/web; error_page 404 /s/404.html; error_page 403 =404 /s/404.html; location /s/404.html { internal; } # etc } The location line makes http://example.com/s/404.html produce a 404 as well. ...


0

After hours of searching and reading Apache documentation I've come up with a solution that allows to use the pool, and also allow the Rewrite directive in .htaccess to work even when the url contains .php files. <VirtualHost ...> ... # This is to forward all PHP to php-fpm. <FilesMatch \.php$> SetHandler ...


0

You never gave your nginx configuration. However, SIGTERM (15) on PHP-FPM children can be one of these: Open file descriptors too low (edit /etc/security/limits.conf and create an entry for your web user and set 'nofiles' to something higher). Also set rlimit_files to something higher in your PHP-FPM config if you use that You are using fastcgi_keep_conn ...



Top 50 recent answers are included