安裝二套apache service於同一台主機(windows)

網路與網站相關議題和知識
回覆文章
dtchang
Site Admin
文章: 84
註冊時間: 2017-01-22, 16:54

安裝二套apache service於同一台主機(windows)

文章 dtchang » 2018-02-09, 09:10

需建立不同的 service.
1. 先安裝一套 apache
2. 複製 apache 程式目錄
3. 修改新的apache/conf httpd.conf, 設定不同的連接埠,最好是 > 1024, 如:8080,8088...
4. 啟動新的服務(使用管理員權限執行)
httpd.exe -k install -n "New Apache" -f "C:/path/to/httpd.conf"
若不行則改用
httpd.exe -k config -n "New Apache" -f "C:\path\to\httpd.conf

PS. 解除service
httpd.exe -k uninstall -n "New Apache"

-------------
另外有使用 1 apache 2 php (fastcgi)的運作模式

回覆文章