为了账号安全,请及时绑定邮箱和手机立即绑定

为什么我的设置之后,内容不能出来?

<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 video.imooc.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/wwwroot/video/




        # 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
"video" 34L, 1363C          

正在回答

2 回答

好吧,这折腾了一下ubuntu 14.04 LTS + apache2 

如果还是不行的,你要弄两个东西:

1. 复制的是000-default.conf 文件,文件名要有.conf后缀,比如:bbs.conf , oa .conf , video.conf ,不然没用! 切记!!!之后在sites-enabled中创建软链接时,也要注意文件名+.conf后缀:

如: 

ls -s ../sites-available/bbs.conf bbs.conf 

2. 我就问你,原配置文件你停用了没??

修改虚拟主机文件后,禁用默认的虚拟主机配置(000.default.conf),然后启用新的虚拟主机配置,如下sudo a2dissite 000-default.conf && sudo a2ensite unixmen1.local.confsudo a2ensite unixmen2.local.conf


1 回复 有任何疑惑可以回复我~

你设置的路径是/var/wwwroot/video/,你的文件夹是不是这个,你实际的文件夹名称会不会是/wwwroot/video/?要不你再确定一下吧

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

为什么我的设置之后,内容不能出来?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信