亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

我的是這樣的。跟老師講的不一樣。就是沒法正常訪問。訪問到系統默認的去了。

<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 www.example.com


? ? ? ? ServerName www.bbs.net

? ? ? ? ServerAdmin webmaster@localhost

? ? ? ? DocumentRoot /wwwroot/bbs


? ? ? ? # 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


正在回答

6 回答

系統版本不一樣配置文件有一些區別。不過精髓是一樣的。關于不同版本的配置文件區別網上有很多文章提到。

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

a2ensites 下會自動生成軟連接

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

在Ubuntu14.04里,需要修改一下/etc/apache2下的apache2.conf就行,一共兩處需要修改:

(1)添加<Directory ></Directory>標簽

(2)將最下面一行的# IncludeOptional sites-enabled/下面改成:

????????IncludeOptional sites-enabled/

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

ubuntu 14.04 LTS + apache 2.4.7 遇到同樣的問題 測試發現在sites-enabled目錄中創建軟鏈接時,鏈接名稱要跟sites-available中的文件名相同才能生效哦?

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

解決訪問到系統中的問題:查看apache2.conf可以看出include的是從sites-enabled目錄下*.conf文件,所以設置軟連接時不能設置為video,而應該是video.conf,之后重啟就行了。

然后可能會遇到forbidden的錯誤,屬于權限相關:

<Directory?/wwwroot/video/>

????????????????Options?Indexes?FollowSymLinks?MultiViews

????????????????AllowOverride?All

????????????????Require?all?granted

????????</Directory>

具體結合這個:Ubuntu配置apache2.4配置虛擬主機遇到的問題


5 回復 有任何疑惑可以回復我~
#1

慕容9457393

謝謝,遇到的問題解決了
2016-07-10 回復 有任何疑惑可以回復我~

同樓主,有解決的方法么?

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

舉報

0/150
提交
取消

我的是這樣的。跟老師講的不一樣。就是沒法正常訪問。訪問到系統默認的去了。

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號