ทำการเพิ่ม
location ~ .php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
ลงไปในแถบ server ใน nginx.conf ดังข้างล่างครับ
vi /etc/nginx/nginx.conf
server {
server_name
www.packetlove.com packetlove.com; # managed by Certbot
index index.php index.html index.htm;
root /var/www/it-money.com/public_html;
include snippets/phpMyAdmin.conf;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
if ( !-e $request_filename ){
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
location / {
try_files $uri $uri/ /index.html;
}
location ~ .php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
....
หลังจากนั้นทำการ restart nginx 1 รอบ