0
問題: 我想從IIS切換到Apache出於不同的原因,如我也想並行運行的其他東西我需要在一個配置了Apache不同於80的端口。我用一個IP運行多個域,所以我配置了虛擬主機。當我設置的80端口,一切工作正常,只要我切換到另一個端口,我不是隻得到「默認」虛擬主機或在某些配置一個404阿帕奇2.4(win2k12)不接端口8080爲虛擬主機
我試過/做過: - 防火牆配置爲接受8080作爲端口並允許httpd.exe本身。 - netstat僅在我嘗試配置的端口上列出httpd.exe作爲偵聽器。 - IIS不再安裝
下面是工作的配置,很好。 - 當我的每一個端口切換80到8080不起作用 - 當我刪除了明確的IP公司在「聽」到「聽8080」是行不通
任何想法,爲什麼端口8080(我也試過8000 )不起作用?
感謝
etc/hosts中
127.0.0.1 localhost
::1 localhost
127.0.0.1 srv.mydomain.com
::1 srv.mydomain.com
的conf /額外/的httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "c:/folder/htdocs/foo/www"
ServerName www.foo.com
ServerAlias foo.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/folder/htdocs/foo/www"
ServerName www.foo.net
ServerAlias foo.net
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/folder/htdocs/foo/static"
ServerName static.foo.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/folder/htdocs/foo/blog"
ServerName blog.foo.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/folder/htdocs/bar/www"
ServerName www.bar.net
ServerAlias bar.net *.bar.net
</VirtualHost>
的httpd.conf
Listen <ipv4>:80
Listen [<ipv6>]:80
ServerName srv.bar.net
DocumentRoot "c:/folder/htdocs"
<Directory "c:/folder/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Include conf/extra/httpd-vhosts.conf
這不能提供問題的答案。要批評或要求作者澄清,在他們的帖子下留下評論 - 你總是可以評論你自己的帖子,一旦你有足夠的[聲譽](http://stackoverflow.com/help/whats-reputation),你會能夠[評論任何帖子](http://stackoverflow.com/help/privileges/comment)。 - [來自評論](/ review/low-quality-posts/11227894) – Teepeemm
恩,是的,這是一個問題的答案:因爲那是他做錯了。你在說我用疑問的聲音「回答了」我的答案。這仍然是一個答案 – ConnerMan
在這種情況下,如果你沒有提問語氣的話,你的答案可能會更好地幫助其他人。 – Teepeemm