<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MEPO Forum - Apache HTTP Server</title>
        <description></description>
        <link>http://mepopedia.com/forum/list.php?146</link>
        <lastBuildDate>Mon, 27 Apr 2026 21:50:10 +0800</lastBuildDate>
        <generator>Phorum 5.2.7</generator>
        <item>
            <guid>http://mepopedia.com/forum/read.php?146,9351,9351#msg-9351</guid>
            <title>Apache URL Rewriting: 讓網址簡化改為靜態(HTML)的設定(httpd.conf) (no replies)</title>
            <link>http://mepopedia.com/forum/read.php?146,9351,9351#msg-9351</link>
            <description><![CDATA[功能：簡化或縮短網址。<br />
<br />
例子：<br />
<br />
原網址　http://mepopedia.com/forum/list.php?146<br />
簡化後　http://mepopedia.com/forum/146<br />
<br />
原網址　http://mepopedia.com/forum/read.php?146,419<br />
簡化後　http://mepopedia.com/read_146_419.html<br />
<br />
方法：<br />
<br />
1. 確定 Apache web server 有設定為支援 ReWrite（預設是有）：<br />
<br />
　確認在設定檔中有「LoadModule rewrite_module modules/mod_rewrite.so」<br />
　一般而言，設定檔是在 httpd.conf 中。<br />
　路徑可能是 /usr/local/apache2/conf/httpd.conf 或 /etc/apache2/vhosts.d/vhost.conf 等。<br />
<br />
2. 在設定 DocumentRoot 的 <Directory> 中加入以下設定：<br />
<br />
　&lt;Directory "/usr/local/apache2/..."><br />
　　......<br />
　　RewriteEngine On<br />
　　RewriteRule ^forum/([0-9]+)$ /forum/list.php?$1 [L]<br />
　　RewriteRule ^read_([0-9]+)_([0-9]+)\.html$ /forum/read.php?$1,$2 [L]<br />
　　......<br />
　&lt;/Directory><br />
<br />
　其中更改網址的指令是以 regular expression 為主。<br />
<br />
3. rcapache2 restart (重啟Apache server)<br />
<br />
<br />
有關詳細的指令說明，請見以下參考資料。<br />
<br />
<br />
1. <a href=http://httpd.apache.org/docs/2.0/misc/rewriteguide.html>URL Rewriting Guide - Apache HTTP Server Version 2.0</a><br />
2. <a href=http://rental.zhupiter.com/postshow_178_1_1.html>使用 Apache 的 ReWrite 設定讓 URL 變短(short URL)、變成靜態樣式</a><br />
3. <a href=http://ohaha.ks.edu.tw/post/1/47>apache mod_rewrite - URL Rewriting</a> OHaHa's學習心得 (2008)]]></description>
            <dc:creator>Hsinping</dc:creator>
            <category>Apache HTTP Server</category>
            <pubDate>Fri, 19 Nov 2010 16:24:44 +0800</pubDate>
        </item>
        <item>
            <guid>http://mepopedia.com/forum/read.php?146,7312,7312#msg-7312</guid>
            <title>Fedora R12 + IE = &quot;無法顯示 XML 網頁&quot; (2 replies)</title>
            <link>http://mepopedia.com/forum/read.php?146,7312,7312#msg-7312</link>
            <description><![CDATA[各位先進好,<br />
    我有一個XML(SVG)網頁檔, 放在Fedora R12 server (with apache web server, 192.168.0.8) 上, 可以在我的PC上(192.168.0.100)用IE以外(chrome, firefox)的瀏覽器開啟.  一旦以IE開啟就會出現附在後面的錯誤訊息.<br />
    如果我將該網頁檔放到自己的PC上, 可以使用所有瀏覽器(IE, chrome, firefox), 以直接開啟檔案的方式開啟, 或是透過我安裝的 tomcat (192.168.0.100:8080)來開啟.  將該網頁檔放到一般代管web伺服器上也都可以用所有瀏覽器正常開啟.<br />
    看來會遇到問題的狀況是我安裝的Fedora R12 & IE. 請問你有沒有遇過類似的問題, 或者是不是能請你幫忙給一些可能的解決方法或方向?! <br />
<br />
   謝謝! <br />
<br />
---------以下為錯誤訊息<br />
<br />
"無法顯示 XML 網頁<br />
無法使用 樣式表檢視 XML 輸入。請更正錯誤，然後按 重新整理 按鈕，或者稍後再試一次。<br />
無法指出的錯誤處理資源 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' 發生錯誤。" <br />
------------]]></description>
            <dc:creator>hjchen</dc:creator>
            <category>Apache HTTP Server</category>
            <pubDate>Wed, 11 Aug 2010 09:59:19 +0800</pubDate>
        </item>
        <item>
            <guid>http://mepopedia.com/forum/read.php?146,5795,5795#msg-5795</guid>
            <title>建立HTTPS (SSL) 網站的方法：1. 簽發憑證(CA)、2. 修改 httpd.conf 設定 (no replies)</title>
            <link>http://mepopedia.com/forum/read.php?146,5795,5795#msg-5795</link>
            <description><![CDATA[1. 自我簽發憑證<br />
<br />
此法相對於付費的憑證(由Versign、Thawte等授權機構簽發，台灣代理商一年大約二、三萬台幣)，沒有經過公正第三方的認證，不過如果是給「自已人」或者是一般「相信你的網站」的網友，基本上是夠用的。不過「自我簽發憑證」的HTTPS網站，在進入時候，瀏覽器基本上都會有：「您即將進入非安全性的網站，您確定嗎？」之類的提示。點選「是」或「我要進入」就可了。<br />
<br />
1a 找到 Apache 內建的憑證產生器：certificate.sh。<br />
<br />
一般而言，路徑是在：cd /usr/share/doc/packages/apache2/<br />
<br />
先修改裡面的最後一個字 test，改為 custom。修改後內容為：<br />
<code><br />
#!/bin/sh<br />
<br />
./mkcert.sh make --no-print-directory /usr/bin/openssl /usr/sbin/ <b>custom</b><br />
</code><br />
<br />
1b 執行憑證產生器：Shell> ./certificate.sh<br />
<br />
執行後會開始一連串（九個步驟）的互動產生模式。以下簡要提示需要輸入的資訊。<br />
<br />
STEP 0：Signature Algorithm 選「R」或直接按 Enter。(RSA加密支持度比較高)<br />
<br />
STEP 1：產生 Private Key (ca.key)。不需輸入資訊。<br />
<br />
STEP 2：建立憑證簽發請求 (ca.csr)。需輸入以下資訊：<br />
　　Country Name: TW<br />
　　State or Province Name: Taiwan (或「.」)<br />
　　Locality Name: Taipei<br />
　　Organization Name: 填入您所屬的組織，例如 National Taiwan Univerisy<br />
　　Organization Unit Name: 填入您在組織中所屬的單位，例如 Department of Eletronic Engineering<br />
　　Common Name: 可以輸入您的組識名稱或網站名稱，例如 www.yoursite.com<br />
　　Email Address: 簽發憑證擁有人的電子郵件（在這裡是我們自己）<br />
<br />
STEP 3：選擇X.509憑證 (ca.crt) 的版本，預設值是第三版。此處按 Enter 即可。<br />
<br />
STEP 4：對HTTP伺服器產生 RSA Private Key (server.key)。不需輸入資訊。<br />
<br />
STEP 5：對HTTP伺服器建立X.509憑證簽發請求 (server.csr)。需輸入的資訊和 STEP 2 相似，除了 Common Name 的地方注意要輸入網站URL，例如 www.yoursite.com。<br />
<br />
STEP 6：選擇對 Server 的 X.509憑證 (server.crt) 的版本，預設值是第三版。此處按 Enter 即可。<br />
<br />
STEP 7：選擇是否對 CA憑證的 Private Key 加密。如果選擇加密需設定密碼。住後開啟或重啟 Apache Server 皆需輸入此密碼。<br />
<br />
STEP 8：選擇是否對 Server憑證的 Private Key 加密。與上步相同，如果選擇加密需設定密碼。住後開啟或重啟 Apache Server 皆需輸入此密碼。<br />
<br />
經過此九個步驟，憑證的產生就大功告成了。另需注意，此 Script (certificate.sh) 產生的憑證有效期限為一年，過了一年後需重新簽發。<br />
<br />
<br />
2. 修改 Apache Server 相關設定<br />
<br />
底下這個類似 Tutorial 的文章寫得非常好，尤其是用 SUSE 的朋友特別適合(其他的版本大致上只是路徑不同)：<br />
<br />
http://jamesrome.home.comcast.net/~jamesrome/Apache/SSL_in_Apache_2.html<br />
<br />
(寫得有點累了，先放這篇文章作為設定的介紹)<br />
<br />
如果有什麼問題，歡迎提問啊！<br />
<br />
<br />
<br />
另外，如果要將 HTTPS 網站提升安全性，提升為 Strong Encryption 的網站( SSLv2-only、strong encrypttion only等網站設定)，<br />
請參見寫得很詳細、清楚的官方網頁：<br />
<br />
<a href=http://httpd.apache.org/docs/2.2/ssl/ssl_howto.html>SSL/TLS Strong Encryption: How-To</a> (Apache 2.2 Documentation)]]></description>
            <dc:creator>HP</dc:creator>
            <category>Apache HTTP Server</category>
            <pubDate>Thu, 08 Apr 2010 21:59:05 +0800</pubDate>
        </item>
        <item>
            <guid>http://mepopedia.com/forum/read.php?146,2304,2304#msg-2304</guid>
            <title>Virtual Host: 如何在同一個 IP (伺服器)上以不同的 Domain Name 架設多個網站 (no replies)</title>
            <link>http://mepopedia.com/forum/read.php?146,2304,2304#msg-2304</link>
            <description><![CDATA[「多個網站或 Domain 架在同一個 IP 上」在 Apache 的術語中稱作 Name-based Virtual Host。另外還有 IP-based Virtual Host，不過比較不常用，Name-based Virtual Host 也才是本文的介紹主題 (Name-based 顧名思義即指 Domain Name)。<br />
<br />
作法很簡單，若假設 Apache Server 已經正常地運作了，只需修改 httpd.conf 檔案中間的幾個部份。<br />
<br />
以下以將 www.example1.com 與 www.example2.com 架在同一個 Apache Server 底下的設定作為例子。<br />
<br />
<code><br />
NameVirtualHost *:80<br />
<br />
&lt;VirtualHost *:80&gt;<br />
DocumentRoot <b>/www/example1</b><br />
ServerName <b>www.example1.com</b><br />
<br />
# Other directives here / 可於此加入其他所需目錄，例如 CGI Script 的目錄<br />
<br />
&lt;/VirtualHost&gt;<br />
<br />
&lt;VirtualHost *:80&gt;<br />
DocumentRoot <b>/www/example2</b><br />
ServerName <b>www.example2.org</b><br />
<br />
# Other directives here<br />
<br />
&lt;/VirtualHost&gt;<br />
</code><br />
<br />
若進來的 HTTP Request 的 ServerName 不是上述二者，以置於前的 www.example1.com 為主。<br />
<br />
<b>另請注意：不同的 Linux Distribution 的 Apahce 設定方式略有不同，例如 openSUSE 的設定主要是在<br />
<br />
/etc/apache2/default-server.conf（需在檔中(最後)加入  NameVirtualHost *:80），<br />
<br />
同時 Virtual Host 的設定是在 <br />
<br />
/etc/apache2/vhosts.d/*.conf<br />
<br />
（需在該目錄新增 .conf 檔，加上上述之<VirtualHost> Script）。因此，不同的 Linux Distribution 請注意其中可能的差別，但其原理相同。</b><br />
<br />
Refereces:<br />
Official Page: <a href=http://httpd.apache.org/docs/2.0/vhosts/examples.html>VirtualHost Examples</a><br />
Official Paeg: <a href=http://httpd.apache.org/docs/2.0/vhosts/name-based.html>Name-based Virtual Host Support</a>]]></description>
            <dc:creator>HP</dc:creator>
            <category>Apache HTTP Server</category>
            <pubDate>Tue, 20 Oct 2009 20:42:59 +0800</pubDate>
        </item>
        <item>
            <guid>http://mepopedia.com/forum/read.php?146,922,922#msg-922</guid>
            <title>[HOW TO] Start, Restart, and Stop an Apache Web Server (3 Ways for Red Hat, Ubuntu, Debian, and SUSE) (no replies)</title>
            <link>http://mepopedia.com/forum/read.php?146,922,922#msg-922</link>
            <description><![CDATA[There are mainly three kinds of ways to start/restart an Apache Server for different Linux distributions.<br />
<br />
Taking <b>start</b> as a quick example, they are:<br />
<code><br />
Shell>> /usr/local/apache2/bin/apachectl -k start (Red Hat)<br />
Shell>> /usr/local/apache2/bin/httpd -k start (when you don't have apachectl in Red Hat)<br />
Shell>> /etc/init.d/apache2 start (Ubuntu, Debian, SUSE)</code><br />
<br />
<b>NOTE:</b> The path of <b>apachectl</b> and <b>httpd</b> may differ from "/usr/local/apache2/bin/" depending on your installations and in some cases you don't even have to specify the patch.<br />
<br />
<b>I. Use of apachectl</b> (Red Head)<br />
<br />
Basically, it is easy to start/restart/stop an Apache web server by the commands<br />
<br />
Shell>> apachectl -k start<br />
Shell>> apachectl -k restart<br />
Shell>> apachectl -k stop<br />
<br />
to start, restart, stop your Apache server, respectively. Note you may need to specify the path to the apachectl command. For example, you may use<br />
<br />
<b>Full path:</b><br />
Shell>> /usr/local/apache2/bin/apachectl -k restart<br />
<br />
or <br />
<br />
<b>Relative path:</b><br />
Shell>> bin/apachectl -k restart (when the console is in /usr/local/apache2/ in this case)<br />
<br />
for restarting Apache.<br />
<br />
<br />
Also, it is recommeded to use the parameter "graceful" to stop the sever after finishing serving all the HTTP requests while attempting the restart the sever. That is, we use<br />
<br />
Shell>> apachectl -k graceful<br />
<br />
to restart the Apache server.<br />
<br />
<b>You may also note that in SUSE Linux, you can restart (or start) the server by the command:<br />
<br />
Shell> /etc/init.d/apache2 restart</b><br />
<br />
<b>II. Use of httpd</b><br />
<br />
However, due to different versions of installation, sometimes <b>apachectl</b> simply doesn't work. Instead, you may use the command <b>httpd</b> (with a shell path specified). You may use<br />
<br />
Shell>> ./bin/httpd -k restart<br />
<br />
or<br />
<br />
Shell>> ./bin/httpd -k graceful<br />
<br />
to restart your Apache http daemon service.<br />
<br />
<b>III. Use of apache2 (Ubuntu, Debian, SUSE)</b><br />
<br />
<code>Shell> /etc/init.d/apach2 start|restart|stop</code><br />
<br />
You may use the following command for restarting in Ubuntu:<br />
<br />
<code>Shell> sudo /etc/init.d/apach2 start/restart/stop</code><br />
<br />
The Apache Official Documents for<br />
1. <a href=http://httpd.apache.org/docs/2.2/stopping.html>Stopping and Restarting</a><br />
2. <a href=http://httpd.apache.org/docs/2.2/programs/apachectl.html>apachectl - Apache HTTP Server Control Interface</a><br />
3. <a href=http://httpd.apache.org/docs/2.2/programs/httpd.html>httpd - Apache Hypertext Transfer Protocol Server</a>]]></description>
            <dc:creator>HP</dc:creator>
            <category>Apache HTTP Server</category>
            <pubDate>Sat, 11 Jul 2009 15:17:50 +0800</pubDate>
        </item>
        <item>
            <guid>http://mepopedia.com/forum/read.php?146,419,419#msg-419</guid>
            <title>有關 Apache HTTP Server 系統限制與設定的討論 (1 reply)</title>
            <link>http://mepopedia.com/forum/read.php?146,419,419#msg-419</link>
            <description><![CDATA[底下是一些相關討論與說明的文章：<br />
<br />
1. <a href=http://twntwn.info/blog/ajer001/archives/1793>修正 Apache Worker MPM 與 APC 設定<a> (阿駕零零壹 © 學習筆記, 2007/04/22)<br />
<br />
2. <a href=http://forum.heyzu.com.tw/main.php?Y=TE010400&dizcus=149.ERosXVnK>Apache Prefork 和 Worker 模式</a> (黑族論壇 Linux 伺服器討論版, 2009/01/09)<br />
<br />
3. <a href=http://www.56cto.com/html/Microsoft/2/1/40518.html>Apache服务器的配置 详解</a> (56CTO.com, 2008/08/8)]]></description>
            <dc:creator>HP</dc:creator>
            <category>Apache HTTP Server</category>
            <pubDate>Sat, 24 Apr 2010 01:08:45 +0800</pubDate>
        </item>
    </channel>
</rss>
