Skip to content

Instantly share code, notes, and snippets.

@gaurish
Created June 16, 2011 22:13
Show Gist options
  • Save gaurish/1030421 to your computer and use it in GitHub Desktop.
Save gaurish/1030421 to your computer and use it in GitHub Desktop.
PHP Fatal error: require_once(): Failed opening required '/home/gaurish/domains/s3.hostingdost.com/public_html//wp-includes/class-wp-error.php' (include_path='.:/opt/php5/lib/php') in /home/gaurish/domains/s3.hostingdost.com/public_html/wp-load.php on line 48" while reading response header from upstream, client: 59.95.171.33, server: s3.hostingdost.com, request: "GET /news/index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "s3.hostingdost.com"
----------------------------------------
server {
server_name s3.hostingdost.com;
access_log /home/gaurish/domains/s3.hostingdost.com/logs/access.log;
error_log /home/gaurish/domains/s3.hostingdost.com/logs/error.log;
root /home/gaurish/domains/s3.hostingdost.com/public_html;
index index.php index.html;
# # unless the request is for a valid file, send to bootstrap
if (!-e $request_filename)
{
rewrite ^(.+)$ /index.php?q=$1 last;
}
## Block bad bots
if ($http_user_agent ~* (HTTrack|HTMLParser|libcurl|discobot|Exabot|Casper|kmccrew|plaNETWORK|RPT-HTTPClient)) {
return 444;
}
## Block certain Referers (case insensitive)
if ($http_referer ~* (sex|vigra|viagra) ) {
return 444;
}
## Deny dot files:
location ~ /\. {
deny all;
}
## Favicon Not Found
location = /favicon.ico {
access_log off;
log_not_found off;
}
## Robots.txt Not Found
location = /robots.txt {
access_log off;
log_not_found off;
}
location / {
try_files $uri $uri/ index.php?q=$request_uri;
}
location /news/ {
index index.php;
root /home/gaurish/domains/s3.hostingdost.com/public_html/news;
if (-f $request_filename) {
expires 30d;
break;
}
if (-d $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^/news/(.+)$ /news/index.php?q=$1 last;
}
}
location ~ \.php$ {
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
### NginX Status
location /nginx_status {
stub_status on;
access_log off;
}
### FPM Status
location ~ ^/(status|ping)$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
access_log off;
}
}
----------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment