为什么我的虚拟主机在ubuntu 18.04中不工作

时间:2019-09-10 06:45:52

标签: ubuntu virtualhost ubuntu-18.04

我创建了虚拟主机:refer.com,当我运行该域时,考虑了实时站点Refer.com为什么不起作用?我的网站文件夹位于/var/www/refer.com/public_html中,我的虚拟主机文件如下所示,任何人都可以帮助我为什么它无法正常工作,我也启用了该网站,但仍然无法正常工作

refer.com.conf

<VirtualHost *:80>
    ServerAdmin admin@refer.com
        ServerName refer.com
        ServerAlias www.refer.com 
    DocumentRoot /var/www/refer.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

在etc / hosts中,我有此配置

127.0.0.1   localhost
192.168.0.4     refer.com

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

0 个答案:

没有答案