看板 NUU_CSIE 關於我們 聯絡資訊
我剛剛拿家裏主機測試一下,系統是CentOS-5.2 架virtual host沒有問題欸 而且我剛剛看了一下你剛剛上面打的架法 我有點小問題,就是說為什麼會將網頁導向/home/forum去勒? 這樣不就代表說必須要有一個叫forum的user存在嗎? 蠻不直覺的作法啦,雖然看起來好像可以作(這邊存疑) 提供一個剛剛看到的作法,在/var/www底下放自己的資料 原本html那個,就是放sa的資料,如果要放論壇什麼鬼的 再新建一個資料夾給史提芬周就好,就mkdir一個nschou給他就可以了 然後把資料全部丟去進,再重新改一下virtual host的設定檔 NameVirtualHost *:80 <Directory "/var/www/html"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/var/www/nschou"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <VirtualHost *:80> ServerName sa.csie.nuu.edu.tw DocumentRoot /var/www/html CustomLog /var/log/http/sa.access_log combine #記得先touch一個檔案出來紀錄 </VirtualHost> <VirtualHost *:80> ServerName forum.csie.nuu.edu.tw DocumentRoot /var/www/nschou CustomLog /var/log/httpd/forum.access_log combined #一樣,先touch一下 </VirtualHost> 上面的方式測試正常 不會亂連結 至於virtual host亂跑的原因,我猜可能是dns吧~"~ -- ˍˍ 如果我手中有酒,希望與你共飲。 ▕羽人▏ 如果我手上有刀,希望與你一同抗敵。▕非獍▏  ̄ ̄ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.118.54.31
rkcity:不用一個forum的user呀.. 用alias就可以了.. 05/04 01:05
godman362:不解,請蕭大師賜教 05/04 09:52