0
這讓我感到莫名其妙。當我訪問域時,它下載index.php
文件。當我訪問domain/index.php時,它工作正常。我試圖在這裏和那裏發表評論,但無法修復。這一個是Zend Framework 3
。我在同一臺服務器上有其他的PHP網站。他們很好。我開始想知道現在是ZF3的特別之處。當按下域名時,PHP-FPM/ZF3下載php文件
我nginx的是這樣的:
server {
listen 80;
server_name xxx.xxx.com;
index index.php index.html;
root /data/www/xxx/public;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /data/www/xxx/public/index.php;
}
access_log logs/worth.jusfeel.cn.log main;
}
我已經嘗試過其他的設置也是如此。一樣的。地址欄中的網址更改爲..domain/index.php
,但仍下載index.php
文件。
server {
listen 80;
server_name www.example.com;
root /var/www/www.example.com/myapplication;
index index.html index.htm index.php;
location/{
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}