Linux Apache2000默认VHost赢得';不要被请求选择

Linux Apache2000默认VHost赢得';不要被请求选择,linux,debian,apache2,apache2.4,debian-stretch,Linux,Debian,Apache2,Apache2.4,Debian Stretch,我有一个安装了Debian GNU/Linux 9(stretch)和Apache/2.4.25(Debian)的Linux服务器。我想在我的服务器上托管多个网站。例如,一个主要的wesbites和2-3个较小的朋友网站。我还希望在请求到达VHosts中未配置的web服务器时显示一个默认页面(例如de-IP地址)。例如,欢迎收看bla bla bla 我想指出的是,每次更改后,我都会重新加载Web服务器,并且所有文件权限都是正确的 我的配置: 启用的站点: 000-default.conf: &

我有一个安装了Debian GNU/Linux 9(stretch)和Apache/2.4.25(Debian)的Linux服务器。我想在我的服务器上托管多个网站。例如,一个主要的wesbites和2-3个较小的朋友网站。我还希望在请求到达VHosts中未配置的web服务器时显示一个默认页面(例如de-IP地址)。例如,欢迎收看bla bla bla

我想指出的是,每次更改后,我都会重新加载Web服务器,并且所有文件权限都是正确的

我的配置:

启用的站点:

000-default.conf:

<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin admin@vaorra.net
DocumentRoot /websites/www/

<Directory /websites/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
            Require all granted
</Directory>

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

#ServerName指令设置请求方案、主机名和端口
#服务器使用来标识自身。这在创建时使用
#重定向URL。在虚拟主机的上下文中,服务器名
#指定必须在请求的主机:标头中显示的主机名
#匹配此虚拟主机。对于默认虚拟主机(此文件),此
#该值不是决定性的,因为它被用作最后的宿主。
#但是,必须为任何其他虚拟主机显式设置它。
#服务器名www.example.com
服务器管理员admin@vaorra.net
DocumentRoot/websites/www/
选项索引跟随符号链接多视图
允许超越所有
命令允许,拒绝
通融
要求所有授权
#可用日志级别:trace8、…、trace1、调试、信息、通知、警告、,
#错误、暴击、警报、紧急情况。
#还可以为特定应用程序配置日志级别
#模块,例如。
#日志级别信息ssl:警告
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
#对于conf/available/中的大多数配置文件
#在全局级别启用或禁用,可以
#仅包含一个特定虚拟主机的行。例如
#以下行仅为此主机启用CGI配置
#在使用“A2F”全局禁用后。
#包括conf available/service-cgi-bin.conf
openair-seuzach.ch.conf:

<VirtualHost openair-seuzach.ch:80>

    ServerName openair-seuzach.ch

    ServerAdmin admin@vaorra.net

    DocumentRoot /websites/openair-seuzach.ch/
    <Directory /websites/openair-seuzach.ch/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
            Require all granted
    </Directory>

 </VirtualHost>

ServerName openair-seuzach.ch
服务器管理员admin@vaorra.net
DocumentRoot/websites/openair-seuzach.ch/
选项索引跟随符号链接多视图
允许超越所有
命令允许,拒绝
通融
要求所有授权
vaorra.net.conf:

<VirtualHost vaorra.net:80>

    ServerName vaorra.net

    ServerAdmin admin@vaorra.net

    DocumentRoot /websites/vaorra.net/
    <Directory /websites/vaorra.net/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
            Require all granted
    </Directory>

ServerName vaorra.net
服务器管理员admin@vaorra.net
DocumentRoot/websites/vaorra.net/
选项索引跟随符号链接多视图
允许超越所有
命令允许,拒绝
通融
要求所有授权

“我的服务器”正在运行,您需要自己测试它: ->应该是“马上就来” ->应该是“瓦通!”

当你继续的时候,也会出现“Wartung!”但是在这个域中,我希望显示默认的VHost站点,而不是openair seuzach VHost的站点

我的apache2.conf文件:

DefaultRuntimeDir ${APACHE_RUN_DIR}

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

Include ports.conf

AccessFileName .htaccess
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-                                                Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

IncludeOptional sites-enabled/*.conf
DefaultRuntimeDir${APACHE\u RUN\u DIR}
PidFile${APACHE_PID_文件}
超时300
继续
MaxKeepAliveRequests 100
保持超时
用户${APACHE\u RUN\u User}
组${APACHE\u RUN\u Group}
主机名查询
ErrorLog${APACHE_LOG_DIR}/error.LOG
日志级别警告
包括可选mods启用/*.加载
IncludeOptional mods enabled/*.conf
Include ports.conf
AccessFileName.htaccess
要求全部拒绝
日志格式“%v:%p%h%l%u%t\%r\”%>s%O\“%{Referer}i\\”\“%{User-Agent}i\\”vhost\\组合
日志格式“%h%l%u%t\%r\”%>s%O\“%%{Referer}i\\\“%%{User Agent}i\\”组合
日志格式“%h%l%u%t\%r\“%>s%O”通用
日志格式“%{Referer}i->%U”Referer
日志格式“%{User agent}i”代理
包括语句的通用片段
IncludeOptional conf enabled/*.conf
IncludeOptional sites enabled/*.conf

谢谢

apachectl-S
注释中的输出指出,您打算成为非默认虚拟主机的地址规范与您打算成为默认虚拟主机的地址规范不同


换句话说,第一个列出的
仅是所有vHost的默认值,并且正好是
。因为你有精确的匹配,比如<代码> <代码>,Apache甚至不会考虑通配符*:80更不用说它是默认的/catch所有。p>
apachectl-S
请输出?或者@covener@jww是这样的,所以我必须到处使用