天天看點

Apache設定虛拟機端口 - 程式設計是個無底洞

Apache設定虛拟機端口

Apache虛拟機設定端口,以45184端口為例

httpd-vhosts.conf檔案

NameVirtualHost *:45184

<VirtualHost *:45184>

    DocumentRoot "C:\xampp\htdocs\working\erp\public"

    ServerName test.com

</VirtualHost>

httpd.conf檔案

找到 Listen 80 在下一行添加監聽的端口

Listen 45184

最後一步配置host檔案127.0.0.1 test.com

之後就可以通路test.com:45184