我在 Webmin 上使用 Virtualmin 在 VPS 上配置我的网站。
一切正常,但现在我尝试创建一个新域,但是当我将文件放入其中时,它public_html
会提供 php 文件下载而不是执行它。如何解决这个问题
这是我的 apache 配置(找不到任何奇怪的东西):
/etc/apache2/sites-available/testbyc.--.nu.conf
SuexecUserGroup "#1009" "#1011"
ServerName testbyc.--.nu
ServerAlias www.testbyc.--.nu
ServerAlias webmail.--.--.nu
ServerAlias admin.testbyc.--.nu
DocumentRoot /home/byc/domains/testbyc.--.nu/public_html
ErrorLog /var/log/virtualmin/testbyc.--.nu_error_log
CustomLog /var/log/virtualmin/testbyc.--.nu_access_log combined
ScriptAlias /cgi-bin/ /home/byc/domains/testbyc.--.nu/cgi-bin/
ScriptAlias /awstats/ /home/byc/domains/testbyc.--.nu/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/byc/domains/testbyc.--.nu/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/byc/domains/testbyc.--.nu/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/byc/domains/testbyc.--.nu/fcgi-bin/php5.fcgi .php5
</Directory>
<Directory /home/byc/domains/testbyc.--.nu/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.testbyc.--.nu
RewriteRule ^(.*) https://testbyc.--.nu:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.testbyc.--.nu
RewriteRule ^(.*) https://testbyc.--.nu:10000/ [R]
php_admin_value engine Off
IPCCommTimeout 31
FcgidMaxRequestLen 1073741824
<Files awstats.pl>
AuthName "testbyc.--.nu statistics"
AuthType Basic
AuthUserFile /home/byc/domains/testbyc.--.nu/.awstats-htpasswd
require valid-user
</Files>
RedirectMatch /cgi-bin/mailman/([^/\.]*)(.cgi)?(.*) https://testbyc.--.nu:10000/virtualmin-mailman/unauthenticated/$1.cgi$3
RedirectMatch /mailman/([^/\.]*)(.cgi)?(.*) https://testbyc.--.nu:10000/virtualmin-mailman/unauthenticated/$1.cgi$3
Alias /pipermail /var/lib/mailman/archives/public