Category Archives: nginx

NGINX Permission denied in error.log

Looking at the webervers error logs, i´ve found a lot of entries in one of them in an ISPConfig 3 environment:

[crit] 26595#0: *28425 open() "/var/www/site/web/" failed (13: Permission denied), client: xx.xx.xx.xx, server: host.tld, request: "GET / HTTP/1.1", host: ""

I spent some minutes to figure it out. In my case it was a permission error on website root folder (permissions were set to 711).

A simple command “chmod 751 web” fixes my problem.

See also:

Using Maxmind´s GeoIP with Nginx for Piwik or other Scripts

Since Piwik 1.9 it´s possible to determine location of visitor IP’s with Maxmind´s GeoIP Databases.  More

If you are using nginx, follow this tutorials:
– Using GeoIP With Nginx On Debian Squeeze/Ubuntu 11.04
– How do I install the GeoIP module for Nginx? (Piwik FAQ #166)

See result:

GeoIP Databases cron update:

cd /etc/nginx/geoip
gunzip -f GeoIP.dat.gz
gunzip -f GeoLiteCity.dat.gz

Remove PHP X-Powered-By & Nginx Server Details from HTTP Response Header

To remove Server details from Response Header for e.g. security reasons, like

Server nginx/1.2.4
X-Powered-By PHP/5.3.17-1~dotdeb.0

it´s necessary to edit php.ini & nginx.conf as follows.

To remove X-Powered-By completely, expose_php should be disabled in php.ini.
expose_php = Off


To remove Server Version from Header, server_tokens should be disabled in nginx.conf.
server_tokens off;

See also:,1646

concrete5 nginx configuration

“Concrete cannot parse the PATH_INFO or ORIG_PATH_INFO information provided by your server.”


    location / {
      try_files $uri $uri/ /index.php/$request_uri;

	location ~ \.php($|/) {
		set $script $uri;
		if ($uri ~ "^(.+\.php)(/.+)") {
			set $script $1;
		include /etc/nginx/fastcgi_params;
		fastcgi_pass IP:Port;
		#fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_param PATH_INFO $fastcgi_script_name;
		fastcgi_param  URI $uri;
		fastcgi_intercept_errors on;

nginx: bind() to failed (99: Cannot assign requested address)

Following error occurs on nginx restart, if the A Record of a Domain (sites-enabled) points to another IP as nginx is running on.

Nginx Host IP:
Domain IP (A Record) changed to:

nginx configtest (see nginx documentation / full command depends on host os)


Testing nginx configuration: the configuration file /etc/nginx/nginx.conf syntax is
ok[emerg]: bind() to failed (99: Cannot assign requested address)
configuration file /etc/nginx/nginx.conf test failed


Remove linked Host Configuration File for related Domain and start nginx as usual.