如何在Debian下的用户目录中为网站启用Apache虚拟主机?

时间:2019-01-10 14:04:15

标签: apache

我想在本地运行一个网站,该网站的文件位于我的用户目录中,我在下面创建了.conf文件,并重新加载了apache,当我在浏览器中键入/localhost/instanote.com时,它不是找不到。

ServerName instanote.com

ServerAlias insta-note.com




DocumentRoot /home/thomas/ownCloud/CW14/cms_cw14
<Directory "/home/thomas/ownCloud/CW14/cms_cw14">
    Options FollowSymlinks
    AllowOverride 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 *:80”>“”“ <”“ / VirtualHost”“>”上面没有显示,但是它们是存在于我的代码中 谢谢

0 个答案:

没有答案