【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
大家好:
最近有使用虛擬主機與Windows+appserv來架設XOOPS,均架設成功可以正常運作。
但是在加裝"樹枝狀選單後",發現小小的問題。:confused:
在虛擬主機中 [url]http://abc/xoops/modules/news[/url]
可以正確轉到 [url]http://abc/xoops/modules/news/[/url]
但在Windows+appserv中 [url]http://xyz/xoops/modules/news[/url]
卻是"無法顯示網頁",需要在最後的網址加上"/"才能正確顯示。
而在架設Windows+appserv的本機電腦上,打入 [url]http://xyz/xoops/modules/news[/url]
卻可以正確轉到 [url]http://xyz/xoops/modules/news/[/url]
有利用appserv和alias的關鍵字尋找過,但是並沒有找到相關的資料,相信虛擬主機做的到的設定,應該在自行架設的部分應該也做得到...
感謝各位前輩的指教^^:)
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
建議你把httpd.conf 設定檔
VirtualHost設定貼出來看看.
比較容易找出問題所在.
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
[QUOTE=bsup]
但在Windows+appserv中 [url]http://xyz/xoops/modules/news[/url]
卻是"無法顯示網頁",需要在最後的網址加上"/"才能正確顯示。
而在架設Windows+appserv的本機電腦上,打入 [url]http://xyz/xoops/modules/news[/url]
卻可以正確轉到 [url]http://xyz/xoops/modules/news/[/url]
有利用appserv和alias的關鍵字尋找過,但是並沒有找到相關的資料,相信虛擬主機做的到的設定,應該在自行架設的部分應該也做得到...
感謝各位前輩的指教^^:)[/QUOTE]
你windows+appserv中server name設定為何?
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
[URL="http://ufowater.pcadsl.com/httpd.conf.txt"]httpd.conf 設定檔[/URL]
**********
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][email protected][/email]
# 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., [url]http://123.45.67.89/[/url])
# 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 [url]http://ufowater.pcadsl.com/[/url]
這裡我試過把
#ServerName [url]http://ufowater.pcadsl.com/[/url]
改為
ServerName [url]http://ufowater.pcadsl.com/[/url]
但是,[url]http://ufowater.pcadsl.com[/url] 在其他電腦會自動導向 [url]http://ufowater.pcadsl.com/[/url]
[url]http://ufowater.pcadsl.com/demo[/url] 還是會出現"無法顯示網頁",必須打入"/"
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
[QUOTE=bsup][URL="http://ufowater.pcadsl.com/httpd.conf.txt"]httpd.conf 設定檔[/URL]
**********
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][email protected][/email]
# 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., [url]http://123.45.67.89/[/url])
# 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 [url]http://ufowater.pcadsl.com/[/url]
這裡我試過把
#ServerName [url]http://ufowater.pcadsl.com/[/url]
改為
ServerName [url]http://ufowater.pcadsl.com/[/url]
但是,[url]http://ufowater.pcadsl.com[/url] 在其他電腦會自動導向 [url]http://ufowater.pcadsl.com/[/url]
[url]http://ufowater.pcadsl.com/demo[/url] 還是會出現"無法顯示網頁",必須打入"/"[/QUOTE]
如果servername改成ufowater.pcadsl.com呢?
回覆: 【問題】虛擬主機與Windows+appserv架設XOOPS的網址問題
啊!可以了!
我改成
#ServerName localhost
ServerName ufowater.pcadsl.com
就可以了!:circle:
感謝carloschen前輩^^