Apache 错误:_default_ 虚拟主机在端口 443 上重叠 [英] Apache error: _default_ virtualhost overlap on port 443
问题描述
我在尝试启动 Apache 时遇到此错误.
I get this error when trying to start Apache.
_default_ 虚拟主机在端口 443 上重叠
_default_ virtualhost overlap on port 443
我正在尝试设置 SSL.几乎所有在线解决方案都说添加:
I'm trying to set up SSL. Almost every solution online says add:
NameVirtualHost *:443
到conf文件,但Apache仍然无法启动,只是说
to the conf file but Apache still fails to start and just says
操作启动失败.apache 日志可能有更多信息
Action start failed. the apache logs may have more information
Apache 日志中的信息为零.
There is zero information in the Apache logs.
推荐答案
要解决 Debian/Ubuntu 系统上的问题,请修改 /etc/apache2/ports.conf
设置文件,添加 NameVirtualHost *:443
到它.我的 ports.conf
目前如下:
To resolve the issue on a Debian/Ubuntu system modify the /etc/apache2/ports.conf
settings file by adding NameVirtualHost *:443
to it. My ports.conf
is the following at the moment:
# /etc/apache/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
NameVirtualHost *:443
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
NameVirtualHost *:443
Listen 443
</IfModule>
此外确保 'sites-available/default-ssl' 未启用,键入 a2dissite default-ssl
以禁用该站点.当您使用它时,单独键入 a2dissite
以获取列表并查看您是否启用了可能映射到端口 443 的任何其他站点设置.
Furthermore ensure that 'sites-available/default-ssl' is not enabled, type a2dissite default-ssl
to disable the site. While you're at it type a2dissite
by itself to get a list and see if there is any other site settings that you have enabled that might be mapping onto port 443.
这篇关于Apache 错误:_default_ 虚拟主机在端口 443 上重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!