apache虛擬主機設定問題............................【求助】





頁 : 1 [2] 3

iamdc
2003-08-18, 08:25 AM
最初由 ELIJAHY 發表
遠是不行呀
打bbs.elijahy.com時會連去主目錄D:/www裡去的呀
我想問昭有人在apache上架設虛擬主機成功嗎
有阿∼我就架的好好的。妳有看了我的留言嗎?還是你看不懂呢?




ELIJAHY
2003-08-18, 02:14 PM
最初由 iamdc 發表
有阿∼我就架的好好的。妳有看了我的留言嗎?還是你看不懂呢?
那你可否貼貼你的httpd.conf源碼讓我看看究竟我是匠裡出錯嗎
因我巳試了很多次也不能成功呵

iamdc
2003-08-18, 03:09 PM
可是你要先回答我問的問題我才能幫你阿 @@||

第一點
DNS 是你自己代管的還是請別人代管的呢?控制權不在你那域名沒設定光在 httpd.conf 設定是無效的。

第二點
還有請把 #NameVirtualHost * 前面的 # 拿掉喔
也就是要使用 NameVirtualHost *

第三點

<VirtualHost elijahy.com>
<VirtualHost bbs.elijahy.com>
都改為
<VirtualHost *>

且 ServerAlias elijahy.com 與 ServerAlias bbs.elijahy.com 請都拿掉

第四點
修改完成後請儲存∼然後重新啟動 restart apache 即可∼

如果還是不行,那就是因為 DNS 控制權不在你那∼請你的 DNS 服務商幫你開對應的域名即可∼

luckyboys
2003-08-18, 03:28 PM
這位ELIJAHY老大:eek:

你的主機IP是210.0.166.231
但是,你的網址bbs.elijahy.com卻是跑到64.74.96.230這個IP的主機上面 :corkysm: :corkysm:

這樣子
你到底發現問題在那了沒?

你的bbs.elijahy.com網址
根本不是直接進入你210.0.166.231這個IP的主機上
所以不管你httpd.conf再如何努力的修改
......都素沒有用的啦!:circle:

這樣子你如果還是看不懂
那偶也沒辦法

ELIJAHY
2003-08-18, 04:24 PM
成功呀,終於都成功了
多謝各位大大不厭我煩的教導我
真的謝謝呀
-----------------
但我還有一個問題呀
就是怎樣才可以令logs/裡的access.log和error.log不記錄資料呢??

iamdc
2003-08-18, 05:16 PM
在 httpd.conf 裡把紀錄的功能在前面加上 # 隱蔽掉即可∼

ELIJAHY
2003-08-18, 06:08 PM
最初由 iamdc 發表
在 httpd.conf 裡把紀錄的功能在前面加上 # 隱蔽掉即可∼
謝謝.....
但error.log好像刪不掉呵

iamdc
2003-08-19, 12:09 AM
要刪掉的話要先把 apache 整個 Stop 才行喔∼

ELIJAHY
2003-08-19, 01:56 AM
最初由 iamdc 發表
要刪掉的話要先把 apache 整個 Stop 才行喔∼
我把 apache 整個 Stop 了呀
但error.log會從著apache的運行而又產生出來的呀

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
#ErrorLog logs/error.log

#
# LogLevel: Control the number of messages logged to the error.log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel emerg

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog logs/access.log common

#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer.log referer
#CustomLog logs/agent.log agent

蓋瑞
2003-09-07, 10:23 PM
to:ELIJAHY
可否貼上你的 httpd.conf 源碼讓我看看嗎? 因為我也有相同的困擾ㄋ
還有 DNS 是你自己架設的還是請別人代管的呢?
謝謝您