Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Need help with nginx.conf (blank page after new install)

Started by Muut Archive 10 years ago · 1 replies · 1162 views
10 years ago

grav ver 1.1.1 (core+admin)
install method: local unpack-->ftp download
server: nginx+php5-fm (control panel Vesta)
nginx.conf (i use this conf with wordpress -work fine)

TXT

server {
    listen      xxx.xxx.xx.xx:80;
    server_name site.com www.site.com;
    root        /home/site/web/site.com/public_html;
    index       index.php index.html index.htm;
    access_log  /var/log/nginx/domains/site.com.log combined;
    access_log  /var/log/nginx/domains/site.com.bytes bytes;
    error_log   /var/log/nginx/domains/site.com.error.log error;

        gzip on; # set gzip
        gzip_disable "msie6";
        gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

    location / {

if ($host ~* ^site\.com$) { 
    rewrite ^(.*) http://www.site.com$1 permanent;
    break;
}

location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;
}        

        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
            expires     max;
        }

        location ~ [^/]\.php(/|$) {
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            if (!-f $document_root$fastcgi_script_name) {
                return  404;
            }

            fastcgi_pass    127.0.0.1:9002;
            fastcgi_index   index.php;
            include         /etc/nginx/fastcgi_params;
        }
    }

    error_page  403 /error/404.html;
    error_page  404 /error/404.html;
    error_page  500 502 503 504 /error/50x.html;
}
---
10 years ago

Please compare your Nginx.conf to the one in the webserver-configs folder in the Grav install.

However a blank page usually means a PHP error or missing dependency of some sort. Please check the required dependencies from the docs and also check your php and Nginx error logs for clues.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1346 9 years ago
Archive · by Muut Archive, 9 years ago
2 933 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago