nginx เจอปัญหาเรียกไฟล์ php มันกลับกลายเป็น download file php มาที่คอมของเรา

เริ่มโดย kcontrol, 19 มีนาคม 2019, 05:49:16

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

kcontrol

กำลังจะย้ายเครื่องมาใช้ Centos 7 , php 7

ผมติดตั้งตามขั้นตอนลิ้งด้านล่างบน digitalocean ตามขั้นตอนเปะ ๆ แต่ปัญหาคือพอเรียกไฟล์ .php มันดาวโหลดออกมายังคอมเราเฉยเลย

ปวดหัวมาก ๆ หาทางออกไม่เจอ แนะนำทีครับว่าปัญหานี้เกิดจากอะไร

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-7

https://www.hostinger.com/tutorials/how-to-install-lemp-centos7

pharaoh_za

น่าจะเป็นปัญหาที่ phph ครับ ลองลง php ใหม่ดูครับ หรือไม่เข้าไปเช็คดูที่ log หน่อยครับ ว่าแจ้งว่าไร
[direct=https://www.marketdogs.com]ซื้อขายหมา ขายสุนัข ขายหมา ซื้อหมา ซื้อขายสุนัข[/direct][direct=http://www.marketbirds.com/]ซื้อขายนก ขายนก ซื้อนก[/direct][direct=https://www.thaipedigree.com]ใบเพ็ดดีกรี[/direct][direct=https://mdogs.app/]ตลาดซื้อขายหมา[/direct][direct=https://petai.me/]AI เพื่อสัตว์เลี้ยง[/direct]


mean



[direct=https://www.ireallyhost.com/]บริการโดเมน, เว็บโฮสติ้ง, SSL Certificate[/direct]
[direct=https://www.ireallyhost.com/ssl]บริการ SSL Certificate , HTTPS สำหรับเว็บไซต์[/direct]
[direct=https://www.ireallyhost.com/]บริการ Web Hosting Free! Domain name ตลอดอายุบริการ [/direct]
[direct=https://www.ireallyhost.com/domain]บริการ จดโดเมน, Free DNS Service, Domain Forwarding, จัดการโดเมนได้เอง Domain Control Panel[/direct

iam...

ตามนี้เลย

#vi /etc/nginx/conf.d/domain.ext.conf

server {
    location / {
   root   /full_path/domain.ext;
        index  index.php index.html;
    }

    location ~ \.php$ {
        root           /full_path/domain.ext;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_read_timeout 600;
        fastcgi_index  index.php;
        fastcgi_param SCRIPT_FILENAME /full_path/domain.ext$fastcgi_script_name;
        include        fastcgi_params;
    }

}

#service nginx reload