嗯, 不行,出现: No input file specified. 的提示, 在网上找了一下,貌似rewrite也不起作用。。。
估计的确如二位所说,可能和服务器配置有关。但wordpress为什么运行正常?
另外装了drupal两个版本: 8.5.0出现404, 但7.57出现的问题是theme根本不起作用,也不能改,页面看上去很难用
因为nginx比较小, 俺用的是nginx服务器。 下面为nginx.conf, 谢谢!
http {
server {
access_log /tmp/nginx-access.log;
# ssl off;
listen 8080 default_server;
# listen [::]:8080 default_server ipv6only=on;
#root /usr/share/nginx/html;
root /windows/e/cms/drupal/;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ @rewrite; # =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
#root /home/chenzero/gitrepos;
}
# 从其它地方考来的,不知道是不是这样配置
location @rewrite {
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_read_timeout 1200;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_index index.php;
}
}