php - Wordpress 给出“未指定输入文件”错误,但仅在主域上
问题描述
我已将相同的 Wordpress 安装上传到服务器上的两个目录:
/public_html/domain.com
/public_html/de.domain.com
您可能已经猜到了,第一个是主域 (domain.com) 的文档根,第二个是子域 (de.domain.com) 的文档根。
奇怪的是:安装在 de.domain.com 中运行良好,但在 domain.com 上我得到的只是一行文字No input file specified
,没有进一步的解释。
我浏览了互联网,发现了 100 个类似的问题,但没有一个与此完全相同。不用说,那里提出的任何建议都不适合我。举几个最常见的例子:
- 是的,我正在使用最新的 Wordpress
- .htaccess 文件在两个目录中是相同的
- 没有重定向
- 缓存已被清除
这是 .htaccess 的价值:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
附加信息:
- 当我以简单的文本行导航到 domain.com(或 domain.com/wp-admin/setup-config.php)时出现错误。
- 这是一个新的 WP 安装,通过上传我从 wordpress.org 获得的 zip 来完成
- 据我所知,服务器日志中没有任何内容
- 我尝试更改主域的文档根目录(更改为我创建的不同目录)但没有更改
解决方案
没有指定输入文件不是wordpress的错误,而是nginx的错误。
这意味着 nginx 找不到它应该使用的文件。
检查您的服务器配置。
https://nginxlibrary.com/resolving-no-input-file-specified-error/
推荐阅读
- sqlalchemy - SqlAlchemy:未定义此子句的布尔值
- c# - Resharper 打破了 Visual Studio 2019 的功能
- java - 如何获得 BigDecimal 中的确切值?
- windows - Icecast 和 SSL:自动 .pem 密码(Windows)
- r - 保持参与者内的估算值一致
- javascript - typescript 访问修饰符和 javascript 访问修饰符有什么区别?在使用打字稿时我应该更喜欢哪一个?
- android - 有没有办法下载 Android 应用程序的 AAB(Android App Bundle)版本?
- url - 在 Microsoft Word 中禁用 INCLUDEPICTURE 的 URL 编码
- php - 在自定义助手 Codeigniter 4 中加载视图
- python - 面对这个附加的python Django错误img