我使用Xampp,並且我想test.localhost
轉到127.0.0.1:81
。Apache VirtualHost:如何ServerName一個不同於80的端口
在httpd.conf中我寫道:
Listen 127.0.0.1:81
NameVirtualHost 127.0.0.1:81
<VirtualHost 127.0.0.1:81>
ServerName test.localhost
DocumentRoot "d:\_projects\projectx"
DirectoryIndex index.php
</VirtualHost>
和windows\system32\drivers\etc\hosts
我說:
127.0.0.1 test.localhost
但現在http://test.localhost
使我127.0.0.1:80
。
如何使其進入127.0.0.1:81
?
嗯,我明白了。但是我已經在80端口上有其他東西了 - 所以我實際上不想重定向。儘管如此,你是一個技術上正確的人,所以你應該得到複選標記。 – Mathias