Tag Info

New answers tagged

1

My own experience with Ubuntu 14.04 and PHP shows that certain operations with files included with auto_prepend_file = ... can fail with opcache extension. Try disabling the extension by deleting the symlink: /etc/php5/fpm/conf.d/05-opcache.ini (originally pointing to ../../mods-available/opcache.ini). It can decrease performance, but shouldn't break ...


1

i finally use nginx work with php-fpm, while the apache can keep opening


0

I think that you're config is not correct. It should be something like this: <IfModule mod_fastcgi.c> AddHandler php5-fcgi .php Action php5-fcgi /php5-fcgi Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization -idle-timeout 60 </IfModule> ...


0

Is listen = var/run/php5-fpm-mywebsite.sock correct ? As for virtual host case, you can try these configuration : Apache ( in VirtualHost tag ) ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/DOCUMENT_ROOT_OF_VHOST/$1 PHP-FPM pool listen = 127.0.0.1:9000 If you have no concerns about .htaccess , nginx is recommended.


1

If there is no default site config then nginx will auto select the first available config file when presented with a request it doesn't have specifically configured. In this case when you add the www in front of either domain nginx is selecting website1.com config To resolve this particular issue replace the following lines of the configs website1.com ...


0

If that can help, all you need for massive hosting under apache httpd is the mod_vhost_alias module, you only set up one generic virtualhost with can handle pretty all scenarios as explain on the apache documentation here: mod_vhost_alias I'm using it myself to redirect all my productions client php from sub.domain.tld to my php-fpm production which is ...


2

Multiple roots won't work like that With this config: server { # root /; index index.php index.html index.htm; try_files /srv/web/$uri /srv/php/$uri =404; There is no request processing that would use the index directive, as written the request must match a file. Using the debug log confirms this: 2015/08/24 08:12:11 [debug] 17173#0: *26 try ...


0

Adding this: location ~ ^(.+\.php)(.*)$ { root /usr/share/nginx/html; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; } fixed ...


-2

This is what happened to me: When I deleted my error log, nginx noticed that it was no longer missing. When I recreated this file nginx would no longer recognise that it existed, therefore not writing to the file. To fix this, run these commands (I'm on Ubuntu 14.04 LTS): sudo service nginx reload If that doesn't work, then try: sudo service nginx ...


0

You have wrong fastcgi_pass parameter, it should pass requests to spawn-fcgi just as munin's wiki says not to php-fpm. For Ubuntu/Debian: sudo apt-get install spawn-fcgi spawn-fcgi -s /var/run/munin/fcgi-graph.sock -U www-data -u www-data -g www-data /usr/lib/munin/cgi/munin-cgi-graph And dont forget to fix nginx location and restart it afterwards: ...


1

As stated in the PHP manual for the mail.log option, that file only logs messages sent with php's mail() function. If the attacker is directly connecting to your local SMTP service with fsockopen then anything they send won't be logged.


0

Yes, you need to send this signal, but instead of doing it manually, it is better to add the call of follow script: ... postrotate /usr/lib/php5/php5-fpm-reopenlogs endscript ...


0

This error appears to be caused by a bug in PHP which does not correctly handle fastcgi_finish_request() https://bugs.php.net/bug.php?id=67583 This can be worked around until patched by turning off fastcgi_keep_conn in the Ngynx settings.


2

The log message means that PHP-FPM is sending a record type ID that nginx doesn't understand. It turns out, as you might have guessed, that record type 3 corresponds to FCGI_END_REQUEST. Thus, it would appear that nginx's FCGI support is incomplete, in that it doesn't recognise and correctly handle this record type. I'd suggest either cracking open your ...



Top 50 recent answers are included