Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nginx + PHP-FPM Error: This Page is Temporarily Unavailble
#1
Bug 
Hi Guys,

I am trying to setup a Nginx/PHP-FPM + SimpleCMS server on my raspberry Pi (Raspian) and I am running into some trouble.

When I try to load my site all I get is : This Page is Temporarily Unavailble

I have checked the error logs but there are no errors listed in the nginx log or the php5-fpm log, so I am having a bit of trouble tracking down the issue.

My server is on port 1080 and the content directory is /var/ww/cms

I do not have much experience with Nginx config files so maybe someone could take a look, I believe it is all Ok though:

Code:
#   Pi Nginx Config v0.1 10:53 30/01/2014
#   NOTE: fastcgi is NOT php5-fpm

server {
    listen 1080;
    #       server_name mysite.org;
    charset utf-8;
    access_log off;
    root /var/www/cms;
    index index.php;

    location / {
        try_files       $uri $uri/ /index.php?id=$uri&$args;
    }

   location ~* /admin/.*\.php$ {
        try_files $uri /admin/index.php?id=$uri&$args;      # Try the admin index page
        include /etc/nginx/fastcgi_params;
        fastcgi_index index.php;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
   }        



    location ~* \.php$ {
        try_files $uri =404;        # Try any .php files in root or throw a 404
        include /etc/nginx/fastcgi_params;
        fastcgi_index index.php;
        # NOTE: You should have "cgi.fix_pathinfo = 0;" in /etc/php5/fpm/php.ini
        # With php5-fpm:
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        expires 2h;
    }

    location ~* \.(?:ico|js|gif|jpg|png)$ {
        expires 14d;
    }

    location ~* \.(htm|css|html)$ {
        expires 2d;
    }

# this blocks direct access to the XML files (but sitemap.xml) - that hold all the data
    location ~* \.xml$           { deny all; }
location ~* \.xml\.bak$     { deny all; }
    location = /sitemap.xml { allow all; }

# this prevents hidden files (beginning with a period) from being served
    location ~ /\.          { deny all; }
    location ^~ /uploads/ {
    if ($request_uri ~* \.php$) {return 403;}
    }
}


Any help or advice on the Issue would be great, I would love to get this up and running.

Thanks,
Dan
Reply


Messages In This Thread
Nginx + PHP-FPM Error: This Page is Temporarily Unavailble - by ragebflame - 2014-01-30, 23:29:45



Users browsing this thread: 5 Guest(s)