httpd.conf 相關問題

AppServ Running Discuss
關於 AppServ 架設使用操作討論,沒有按照發文格式一律砍文!

版主: 版主管理群

回覆文章
GamePlayer
星球公民
星球公民
文章: 49
註冊時間: 2005-02-16 08:01

httpd.conf 相關問題

文章 GamePlayer »

Windows 作業系統版本2000 Pro
Appserv 安裝版本:2.4.4a
發生問題:網址加上www便無法找到網頁

現已成功可以在別台電腦連上
但是如果在網址前加www就不能連上(在本機時可以)
例如:
輸入→http://abc.com.twhttp://def.com.tw 可正常開啟網頁
輸入→http://www.abc.com.twhttp://www.def.com.tw 無法開啟網頁

以下是我在 httpd.conf 檔的設定

代碼: 選擇全部

NameVirtualHost 999.999.999.999

<VirtualHost abc.com.tw>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot C:/AppServ/www/user/abc
    ServerName www.abc.com.tw
</VirtualHost>

<VirtualHost def.com.tw>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot C:/AppServ/www/user/def
    ServerName www.def.com.tw
</VirtualHost>
另外在C:\WINNT\system32\drivers\etc\裡面的hosts檔設定

代碼: 選擇全部

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual\r
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

999.999.999.999       abc.com.tw

999.999.999.999       def.com.tw
順便問一下 這樣的狀況 要安裝PHPBB時 有什麼需要注意的??
最後由 GamePlayer 於 2006-01-02 10:13 編輯,總共編輯了 2 次。
作業系統:Windows XP 伺服器→網頁: Apache版本2.0.54‧資料庫: MySQL版本4.1.11
phpBB 版本 :2.0.19 ( Big5 語系 )

請各位大大多多體諒;當我是白癡的教我!!
感謝竹貓這裡的每一個大大
發揮免費軟體的精神 熱於留言助人,我的phpBB是竹貓所有熱心的大大們一起架設完成的
GamePlayer
星球公民
星球公民
文章: 49
註冊時間: 2005-02-16 08:01

文章 GamePlayer »

:-o 真的都沒人欲過這問題嗎??
作業系統:Windows XP 伺服器→網頁: Apache版本2.0.54‧資料庫: MySQL版本4.1.11
phpBB 版本 :2.0.19 ( Big5 語系 )

請各位大大多多體諒;當我是白癡的教我!!
感謝竹貓這裡的每一個大大
發揮免費軟體的精神 熱於留言助人,我的phpBB是竹貓所有熱心的大大們一起架設完成的
咖啡不加糖
星球公民
星球公民
文章: 99
註冊時間: 2005-08-23 22:14
聯繫:

文章 咖啡不加糖 »

你要把 http://www.abc.com 跟 abc.com 都加入設定
應該就沒問題了..至少我從xp改到2003都是這樣..
沒出過問題..
●架設主機作業系統:LlNUX
●我安裝的程式:Apache 2.2.8 + php 5.2.6 + MySQL 5.0.45
●我的 phpBB2 版本:phpBB 3.0.1
GamePlayer
星球公民
星球公民
文章: 49
註冊時間: 2005-02-16 08:01

文章 GamePlayer »

咖啡不加糖 寫:你要把 http://www.abc.com 跟 abc.com 都加入設定
應該就沒問題了..至少我從xp改到2003都是這樣..
沒出過問題..
我已經把 httpd.conf 檔&hosts 檔的設定改成如下:

代碼: 選擇全部

NameVirtualHost 999.999.999.999

<VirtualHost abc.com.tw>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot C:/AppServ/www/user/abc
    ServerName abc.com.tw
</VirtualHost>

<VirtualHost abc.com.tw>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot C:/AppServ/www/user/abc
    ServerName www.abc.com.tw
</VirtualHost>

<VirtualHost def.com.tw>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot C:/AppServ/www/user/def
    ServerName def.com.tw
</VirtualHost>

<VirtualHost def.com.tw>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot C:/AppServ/www/user/def
    ServerName www.def.com.tw
</VirtualHost>
另外在hosts檔改成

代碼: 選擇全部

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

999.999.999.999       abc.com.tw
999.999.999.999       www.abc.com.tw
999.999.999.999       def.com.tw
999.999.999.999       www.def.com.tw
可是還是不行ㄟ
作業系統:Windows XP 伺服器→網頁: Apache版本2.0.54‧資料庫: MySQL版本4.1.11
phpBB 版本 :2.0.19 ( Big5 語系 )

請各位大大多多體諒;當我是白癡的教我!!
感謝竹貓這裡的每一個大大
發揮免費軟體的精神 熱於留言助人,我的phpBB是竹貓所有熱心的大大們一起架設完成的
咖啡不加糖
星球公民
星球公民
文章: 99
註冊時間: 2005-08-23 22:14
聯繫:

文章 咖啡不加糖 »

忘了說...我的 hosts 檔從未更改過,也使用正常至今...
那你試著把
<VirtualHost abc.com.tw>
改成
<VirtualHost *>
然後
NameVirtualHost 999.999.999.999
改成
NameVirtualHost *
最後把 hosts 檔還原成最開始的...
回覆文章

回到「AppServ」