小弟環境是Centos 7
如果是指定ip: http://192.168.1.1/test.php 可以讀取
但如果用網域就會讓你下載 http://test.ptt.com/test.php
location ~ \.php$ {
root /vhost/test.ptt.com/htdocs;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
try_files $uri =404;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
請問該如何是好 感謝各位!
--
如果是指定ip: http://192.168.1.1/test.php 可以讀取
但如果用網域就會讓你下載 http://test.ptt.com/test.php
location ~ \.php$ {
root /vhost/test.ptt.com/htdocs;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
try_files $uri =404;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
請問該如何是好 感謝各位!
--
All Comments