我想测试OTRS的票证系统,所以我在Ubuntu虚拟机中安装了它来玩它。它运行得很好,但我有点怀疑我想要解决:
我在我的“站点启用”文件夹中有以下三个文件:
vagrant@scotchbox:/etc/apache2/sites-enabled$ ls -l
total 0
lrwxrwxrwx 1 root root 35 Jul 10 2015 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root 39 Jul 10 2015 scotchbox.local.conf -> ../sites-available/scotchbox.local.conf
lrwxrwxrwx 1 root root 44 Jan 9 15:10 zzz_otrs.conf -> /opt/otrs/scripts/apache2-httpd.include.confApache没有抱怨它们中的任何一个,所以我认为它们有正确的语法。奇怪的是,当我想要显示虚拟主机时,我得到了以下输出:
vagrant@scotchbox:/etc/apache2/sites-enabled$ apache2ctl -t -D DUMP_VHOSTS
VirtualHost configuration:
*:80 is a NameVirtualHost
default server scotchbox (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost scotchbox (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost scotchbox.local (/etc/apache2/sites-enabled/scotchbox.local.conf:1)
alias www.scotchbox.local如您所见,文件'zzz_otrs.conf‘没有任何内容。但是,如果我转到url 'http://192.168.33.10/otrs/index.pl‘,我可以进入OTRS管理面板,一切都很好。
是否有特殊标志告诉Apache不要显示配置文件?
它是Ubuntu14.04上的Apache2.4.16服务器(我还在Apache2.4.18/Ubuntu16.04上尝试了同样的结果)。
谢谢!
发布于 2018-01-19 16:18:24
原因是配置文件没有指令,而是一个,所以它在运行apache2ctl -t -D DUMP_VHOSTS时没有显示。
https://serverfault.com/questions/893067
复制相似问题