2008年4月9日 星期三

網頁伺服器(apache server轉向設定)筆記

早期縣網規畫的康柏機Debian Server可提供多種服務,如-DNS、MAIL、WEB 等server,為了管理方便自己關閉MAIL、WEB服務功能,只留DNS。MAIL改由LOXA網站托管,WEB Server(網頁伺服器)再添加另一主機以B2D Server LINUX系統所提供XOOPS架站平台,將學校網站建置起來。

DNS那台Debian主機的apache server只負責轉向而已,還真"耐超",從安裝好至今尚未出過問題,應超過五年了。網頁伺服器XOOPS也跑了2年多,才轉手換人管理。不過網頁伺服器最近不正常,暫時由DNS主機轉向多年前Loxa網站提供的網頁平台應急,待資訊組長完成網站建置,再轉回原先設定。

因多年沒用,筆記又沒好好分類,要設定一時找不著,上網查了許久才完成。無意中又發現,趕緊把它放在部落格作為日誌。以下是它的設定筆記。


 

 1.首先用WINSCP程式連線,下載 httpd.conf 設定檔

2.修改/etc/apache/httpd.conf 內容
----------------------------------------------------------------------------
<<主機轉址另機設定>>
#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Format: Redirect old-URI new-URL
#
Redirect / http://163.XX.XX.X/xoops/   <<加入此行另機網址>>

<<本機首頁位置設定>>
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot /var/www    <<預設值>>
DocumentRoot /home/帳號   <<加入此行本機首頁位置>> 
---------------------------------------------------------------------------

3.設定完, 再將 httpd.conf 設定檔傳回覆蓋原檔

4.LINUX重新啟動(reboot)即可。


沒有留言:

張貼留言