好的。这是一个非常奇怪的错误:
我hello在/etc/apache2/sites-enabled/hello.php 中创建了一个名为“ ”的文件夹。然后我创建了一个别名,告诉/hello将转到/etc/apache2/sites-enabled/hello. 这解决了。
然后我尝试制作一个 VHost,它也能正常工作:
Alias /hello /etc/apache2/sites-enabled/hello
<VirtualHost *:80>
ServerAdmin noobletadmin@YYYY.com
DocumentRoot "/etc/apache2/sites-enabled/hello"
ServerName comercial.YYYY.com
ServerAlias ot.YYYY.com
AddType application/x-httpd-php .php3 .php
AddType application/x-httpd-php-source .phps
<Directory /etc/apache2/sites-enabled/hello/>
DirectoryIndex index.php
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
但后来我读到这sites-enabled/仅适用于内部内容的 SymLink,sites-available所以我mv sites-*e/hello sites-available/hello制作了a2ensite hello,那时一切都崩溃了。
以前,PHP 运行良好,“hello”运行得非常好——现在就像没有 PHP 一样。PHP 很好,因为它是我拥有的本地文件的副本。没有错误出现.. 任何地方。我尝试过/var/log/apache/,但与我正在使用 spawns 的任何目录无关。
此外,在移动文件时(是的,我尝试了不同的位置),我注意到我public_html有以下权限方案:
drwxrwxr-x. 8 5500 www-data 4096 May 3 12:08 domain1_com
drwxrwxrwx 2 root root …Run Code Online (Sandbox Code Playgroud)