Tag Info

New answers tagged

0

In the case where your Nginx and php-fpm containers are on the same host, you can configure a small dnsmasq instance on the host to be used by Nginx container, and run a script to automatically update the DNS record when the container's IP address has changed. I've written a small script to do this (pasted below), which automatically update DNS record which ...


1

You can use an upstream to define multiple backends, as described here: http://stackoverflow.com/questions/5467921/how-to-use-fastcgi-next-upstream-in-nginx You'd also want to have the config updated whenever new backends die/come into service with something like: https://github.com/kelseyhightower/confd


1

It is possible that php-fpm only listens on 127.0.0.1 en does not accept connections from other servers, you should run (as root) 'netstat -tulnp' and see on what port/address php-fpm listens on.


0

Figured out the problem myself. php5-fpm does not seem to parse the mode properly in the session.save_path PHP_ADMIN_VALUE fastcgi_param. So, I created this bug: https://bugs.php.net/bug.php?id=69658 This means that you cannot use 0;660;/path, as session_save_path() will return "0" instead of "/path". This works in Apache2 though. Hope this helps ...


0

PHP logs this particular event, (along with many other abnormal things) so you should also watch its logs. For example: WARNING: [pool www] server reached pm.max_children setting (5), consider raising it.


0

Please check for error in /var/log/messages file, there you can find server related error. Is it happening at particular time everyday then you may like to look for cron process which is running at that time and causing issue. You need to check server load at that time and if server load is increasing at that time then you need to check for process ...


0

You're probably hitting an SELinux restriction: by default web server processes are not allowed to access anything in user home directories. There are two ways to resolve this: (Preferred) Relocate the web application to a directory permitted by SELinux, such as a subdirectory of /srv/www (e.g. /srv/www/pydio). Do this if your web application may need to ...


2

I was having the same issue. It turned out the the problem was caused by SCRIPT_FILENAME fcgi param. When I added it to virtual host config everything started working: location ~ \.php$ { include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param ...


2

Nginx interprets a bunch of headers when used as a reverse proxy to honor HTTP intermediate caches specifications. This means the following headers, if present in your app replies, will change caching behaviour as explained : The “X-Accel-Expires” header field sets caching time of a response in seconds. The zero value disables caching for a ...


2

If SELinux is in Enforcing mode, it won't let you do that... Try changing this boolean to true: setsebool -P httpd_enable_homedirs on Please note, I don't recommend disabling SELinux! There are many tools out there which can help you use SELinux to secure your system. Please see the CentOS documentation here: http://wiki.centos.org/HowTos/SELinux ...


0

upstream myapp { server unix:/srv/users/serverpilot/run/myapp.php-fpm.sock; } server { listen 80; server_name my.domain.com; root /srv/users/serverpilot/apps/myapp/public; index index.php index.html index.htm; access_log /srv/users/serverpilot/log/myapp/myapp_nginx.access.log; error_log ...


0

Solution found. To get it working I had to modify the Rewrite rules somewhat and include them in the Apache config file not via .htaccess. Apache also started trying to rewrite index.html on to the end of all folders which needed DirectoryIndex to be changed so index.php was at the start. Finally all the Rewrite rules needed to be absolute with ...


0

if you have a systemd service on CentOs7 you need to stop the service and enable it again to have it fixed systemctl stop httpd vi /usr/lib/systemd/system/httpd.service Add this: [Service] UMask=0002 Save the file with esc ZZ. Enable and start apache again: systemctl enable httpd systemctl start httpd Then the funny part is that i have chmod 774 ...


0

You need to use $is_args for question mark & $args or $query_string for query string afterwards question mark. here it's the last combination. try_files $uri $uri/ /index.php$is_args$query_string; Also be sure that you have set fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; ...


0

A query string starts with a question mark. Then set in the second block : fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Remove include /etc/nginx/fastcgi_params; in the first block since you don't have any fastcgi_pass directive here.



Top 50 recent answers are included