Xampp中怎麼修改Apache伺服器的埠號
阿新 • • 發佈:2019-02-16
下載安裝好Xampp直接start apache服務,可能發現443埠被其他服務所佔有,這時候我有必要修改一下apache伺服器的埠號。
步驟:
點選Config按鈕,可以看到有兩個配置檔案httpd.conf和httpd-ssl.conf;現在要根據埠號錯誤來更改apache的埠號,如果是port 443錯誤,更改http-ssl.conf檔案中的Listen監聽埠,如果是80錯誤,更改httpd.conf檔案中Listen
開啟httpd.conf檔案,找到設定埠的配置資訊如下:
# # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 開啟httpd-ssl.conf檔案,找到設定埠的配置資訊如下: # # When we also provide SSL we have to listen to the # standard HTTP port (see above) and to the HTTPS port # # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two # Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443" # Listen 443
注意:配置檔案比較長,按Ctrl+F查詢關鍵字就快多了,比如直接找80或者443就行了,馬上跳到該段的配置資訊了。
直接更改下Listen的埠號就可以。