vhosts.conf配置文件或相关的端口所在的配置文件,
在server中修改如下即可:
server {
listen 8002;
server_name Admin_Api;
server_name localhost;
root /data/www/PG_Backend_API/public/;
location / {
try_files $uri $uri/ /index.php?$query_string;
index index.php;
}
location ~ ^/.+\.php {
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
}
so easy!