【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題 - PCZONE 討論區

返回   PCZONE 討論區 > ▲ ADSL_CABLE_FTTH 寬 頻 上 網 討 論 > -- 網站架設 / 免費空間 / 虛擬主機 專區 > ☉ -- 架 站 DIY 討 論 版


PCZONE 討論區



通知

☉ -- 架 站 DIY 討 論 版 有了寬頻後,可利用來架設 WWW / FTP / MAIL 等各種 SERVER,請在此版跟大家一起討論各種 SERVER 架設心得。

會員
【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
大家好:

最近有使用虛擬主機與Windows+appserv來架設XOOPS,均架設成功可以正常運作。
但是在加裝"樹枝狀選單後",發現小小的問題。

在虛擬主機中 http://abc/xoops/modules/news
可以正確轉到 http://abc/xoops/modules/news/

但在Windows+appserv中 http://xyz/xoops/modules/news
卻是"無法顯示網頁",需要在最後的網址加上"/"才能正確顯示。

而在架設Windows+appserv的本機電腦上,打入 http://xyz/xoops/modules/news
卻可以正確轉到 http://xyz/xoops/modules/news/

有利用appserv和alias的關鍵字尋找過,但是並沒有找到相關的資料,相信虛擬主機做的到的設定,應該在自行架設的部分應該也做得到...

感謝各位前輩的指教^^

回覆
長工一號
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
建議你把httpd.conf 設定檔
VirtualHost設定貼出來看看.
比較容易找出問題所在.
回覆
會員
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
引用:
作者: bsup
但在Windows+appserv中 http://xyz/xoops/modules/news
卻是"無法顯示網頁",需要在最後的網址加上"/"才能正確顯示。

而在架設Windows+appserv的本機電腦上,打入 http://xyz/xoops/modules/news
卻可以正確轉到 http://xyz/xoops/modules/news/

有利用appserv和alias的關鍵字尋找過,但是並沒有找到相關的資料,相信虛擬主機做的到的設定,應該在自行架設的部分應該也做得到...

感謝各位前輩的指教^^
你windows+appserv中server name設定為何?
回覆
會員
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
httpd.conf 設定檔

**********

VirtualHost設定:
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin [email protected]
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

**********

windows+appserv中server name
#
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName localhost
#ServerName http://ufowater.pcadsl.com/

這裡我試過把
#ServerName http://ufowater.pcadsl.com/
改為
ServerName http://ufowater.pcadsl.com/

但是,http://ufowater.pcadsl.com 在其他電腦會自動導向 http://ufowater.pcadsl.com/

http://ufowater.pcadsl.com/demo 還是會出現"無法顯示網頁",必須打入"/"
回覆
會員
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
引用:
作者: bsup
httpd.conf 設定檔

**********

VirtualHost設定:
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin [email protected]
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

**********

windows+appserv中server name
#
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName localhost
#ServerName http://ufowater.pcadsl.com/

這裡我試過把
#ServerName http://ufowater.pcadsl.com/
改為
ServerName http://ufowater.pcadsl.com/

但是,http://ufowater.pcadsl.com 在其他電腦會自動導向 http://ufowater.pcadsl.com/

http://ufowater.pcadsl.com/demo 還是會出現"無法顯示網頁",必須打入"/"
如果servername改成ufowater.pcadsl.com呢?
回覆
會員
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
啊!可以了!

我改成
#ServerName localhost
ServerName ufowater.pcadsl.com

就可以了!

感謝carloschen前輩^^

回覆







 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。