I installed nginx+php+mysql on a debian server. When I finished establishing drupal8, only the index web page can be visited. When I visit http://localhost:8080/node/add, there is a message showing "500 Internal Server Error"

How do I do?

Comments

Jaypan’s picture

There is no support for Drupal 8 yet as it is not even in alpha version yet. D8 is support-yourself.

dogalifes’s picture

1. Add document_root$fastcgi_script_name

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
}

2. Add rewrite codes

location / {
try_files $uri $uri/ /index.html;

if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}

Now I can visit it normally..