我在Ubuntu上正确地监听127.0.0.1:9000的PHP-FPM设置,它似乎正确地产生了一切,我的nginx也适用于普通的html,这是nginx.conf
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
这是实际的服务器:
server {
listen 80;
server_name localhost;
index index.php index.html index.htm;
root html;
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}
我已经为服务器尝试了不同的配置但结果是相同的,PHP文件服务,我得到提示从浏览器保存它。我该怎么做才能解决这个问题?