php - 使用另一个网站的特定位置时从上游读取响应标头时在标准错误中发送的 FastCGI:“主脚本未知”
问题描述
我使用https://website1.inov.com访问我的网站
如果我尝试访问应该是另一个应用程序的https://website1.inov.com/backend,我会得到一个
从上游读取响应标头时在标准错误中发送的 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;
}
}
你能帮我么 ?谢谢
解决方案
推荐阅读
- php - PHP字符串到关联数组?
- sql - 使用 hql 将列表中的列转换为数组和数组到 hive 中的列表
- reactjs - 通过 github 操作将 React 应用程序部署到 amazon s3
- vb.net - 如何解决 SQL ConnectionString 错误?
- python-3.x - pandas 将字典映射到列表中包含元组的列
- kotlin - LibGDX 纹理在 g3db 模型中使用错误,但在 uv 贴图上正确映射
- typo3 - 如何在 TYPO3 中将类别作为嵌套数组获取?
- json - 列表中所有数字都存在的 Json 数组的 SQL 查询
- javascript - 关闭弹出窗口后,Spotify OAUTH 重定向到父页面
- reactjs - 反应.JS。如何在子组件上应用材质主题?