其他分享
首页 > 其他分享> > 服务器 – 更新到13.10后,Apache虚拟主机不再工作

服务器 – 更新到13.10后,Apache虚拟主机不再工作

作者:互联网

我今天将我的kubuntu更新为13.10,之前完美运行的虚拟主机不再有效.

s2ensite和a2dissite命令声称“站点xxxxxx不存在”,即使文件位于站点 – 可用并且在站点启用我试图从启用站点删除它们然后再次启用它们,但仍然apache声称它们不存在.

这是我的虚拟主机之一.他们基本上都是这样的.

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName expsite.local

    DocumentRoot /var/www/expsite/htdocs
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/expsite/htdocs/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride FileInfo
        Order allow,deny
        allow from all
    </Directory>

#   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
#   <Directory "/usr/lib/cgi-bin">
#       AllowOverride None
#       Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
#       Order allow,deny
#       Allow from all
#   </Directory>

        CustomLog /var/www/expsite/logs/access.log combined
        ErrorLog /var/www/expsite/logs/error.log
        LogLevel warn

#    Alias /doc/ "/usr/share/doc/"
#    <Directory "/usr/share/doc/">
#        Options Indexes MultiViews FollowSymLinks
#        AllowOverride None
#        Order deny,allow
#        Deny from all
#        Allow from 127.0.0.0/255.0.0.0 ::1/128
#    </Directory>

</VirtualHost>

000默认工作正常,我可以启用和禁用它.

解决方法:

Ubuntu 13.10和变种已经转移到Apache 2.4,Apache 2.4希望启用的虚拟主机配置文件默认以.conf结尾.看这里:

http://lyemium.com/content/virtual-host-issues-when-upgrading-apache-22-24

我刚刚将我的vhost配置文件重命名为.conf并且一切正常!

标签:php,server,apache2,virtualhost
来源: https://codeday.me/bug/20190807/1611501.html