為什么我的設(shè)置之后,內(nèi)容不能出來?
<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??????????
2017-07-06
好吧,這折騰了一下ubuntu 14.04 LTS + apache2?
如果還是不行的,你要弄兩個(gè)東西:
1. 復(fù)制的是000-default.conf 文件,文件名要有.conf后綴,比如:bbs.conf , oa .conf , video.conf ,不然沒用! 切記?。?!之后在sites-enabled中創(chuàng)建軟鏈接時(shí),也要注意文件名+.conf后綴:
如:?
ls -s ../sites-available/bbs.conf bbs.conf?
2. 我就問你,原配置文件你停用了沒??
修改虛擬主機(jī)文件后,禁用默認(rèn)的虛擬主機(jī)配置(000.default.conf),然后啟用新的虛擬主機(jī)配置,如下sudo a2dissite 000-default.conf && sudo a2ensite unixmen1.local.confsudo a2ensite unixmen2.local.conf
2016-06-16
你設(shè)置的路徑是/var/wwwroot/video/,你的文件夾是不是這個(gè),你實(shí)際的文件夾名稱會(huì)不會(huì)是/wwwroot/video/?要不你再確定一下吧