0
我从Fedora移到了Ubuntu 16.04。如何在一个文件中设置多个虚拟主机
在fedora我可以在一个文件中列出无尽的虚拟主机。在Ubuntu中,我必须为每个虚拟主机创建一个新文件。我已经有了所有虚拟主机的列表。是在Ubuntu的任何方式来做到这一点?
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/apecenergy.co.uk/public_html
ServerName www.apecenergy.co.uk
ServerAlias apecenergy.co.uk
ErrorLog "/var/log/httpd/apecenergy-error_log"
CustomLog "/var/log/httpd/apecenergy-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/plumbing_sites/crouchendplumber.co.uk/public_html
ServerName www.crouchendplumber.co.uk
ServerAlias crouchendplumber.co.uk
</VirtualHost>
我做了尝试我得到这个消息作为apache2.service失败,因为控制过程退出错误代码。有关详细信息,请参阅“systemctl status apache2.service”和“journalctl -xe”。 – alwayslearning
那些细节中的具体错误是什么? –