1. 下載,及簡單啓動。

到 https://www.apachelounge.com/download/ 下載 Win64 版本,然後解壓縮,可找到 Apache24 。

參照下圖,將 Apache24 整個目錄複製到 C:\ 下。



參照下圖,進入到 C:\Apache24\bin 後,會見到「httpd.exe」,點擊兩下…



參照下圖,會有黑色小窗彈出,代表伺服器已經啟動。其中訊息為「AH00558: httpd.exe: Could not reliably determine the server's fully qualified domain name, using fe80::f821:b47b:b641:4c6b. Set the 'ServerName' directive globally to suppress this message」,只是「C:\Apache24\conf\httpd.conf」設定問題,現時可以不理會。



參照下圖,在網址列輸入 localhost ,Enter 後看到 It works! 網頁,就個預設網頁就是來自 C:\Apache24\htdocs 中的 index.html 。




最後,回到黑色小窗,按 ctrl + C 便可把小窗關掉,即代表把伺服器關掉,網頁也不會顯示。

留言

這個網誌中的熱門文章

3. 虛擬主機

2. 註冊為服務,以服務形式啟動。

6. Apache + PHP 8