root /home/u1/domains/example.com; location / { index index.php index.html index.htm; } location ~ /(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) { deny all; internal; } location ~ \.php$ { fastcgi_pass unix:/var/run/php5-example.com.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\. { deny all; }