如果我尝试访问应该是另一个应用程序的https://website1.inov.com/backend,我会得到
在读取时在stderr中发送的FastCGI:“主脚本未知” 来自上游的响应头
在我的虚拟主机下面:
server {
server_name website1.inov.com www.website1.inov.com;
root /var/www/website1/;
index index.html;
access_log /var/log/nginx/website1.inov.com.access.log combined if=$log_ua;
error_log /var/log/nginx/website1.inov.com.error.log;
# Return a 404 not found for every hidden files
location ~ /\. {
deny all;
return 404;
}
location / {
# Check if a file or directory index file exists, else route it to index.php.
try_files $uri /index.html;
}
location /backend {
alias /var/www/backend;
index index.php;
try_files $uri $uri/ /backend/index.php;
location ~* ^/backend/(.*\.php)$ {
try_files $uri $uri/ =404;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
# fastcgi_split_path_info ^((?U).+\.php)(.*)$;
fastcgi_param PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
fastcgi_param CI_ENV production;
fastcgi_param DOMAIN production;
include fastcgi.conf;
}
}
你能帮我吗? 谢谢