weixin_48119159 2021-04-20 13:26 采纳率: 0%
浏览 96

nginx一直下载PHP文件而不是打开

server {
    listen       80;
    server_name  localhost;

    location / {
        root   /product/test/dev/web/src/;
        index  index.html index.htm index.php;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data1/app/services/nginx/html;
    }

    location ~ \.php$ {
        fastcgi_pass   172.17.0.2:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root/index.php;
        include        /data1/app/services/nginx/fastcgi_params;
    }
}

如题,我的配置是这样的,但是访问项目下的index.php总是会变成下载,PHP-FPM已经启动在9000端口,这个配置有问题吗,是在docker环境下的

  • 写回答

1条回答 默认 最新

  • My_Best_bala 2021-04-20 18:14
    关注

    配置有问题呗

    评论

报告相同问题?

悬赏问题

  • ¥15 chaquopy python 安卓
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥30 vmware exsi重置后登不上
  • ¥15 易盾点选的cb参数怎么解啊
  • ¥15 MATLAB运行显示错误,如何解决?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题