如何configurationApache使用特殊端口时加载特殊文件夹?
文档根目录是: www\
现在我想要加载www\folder\当我inputhttp://localhost:8090/上的url。
我想我应该创build一个虚拟主机。 但不知道如何configuration它。
是的,你自己回答。 这是一个通用的configuration
Server configuration # Ensure that Apache listens on port 80 Listen 80 # Listen for virtual host requests on all IP addresses NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /www ServerName www.example1.com # Other directives here </VirtualHost> <VirtualHost *:8090> DocumentRoot /www/folder ServerName www.example2.org # Other directives here </VirtualHost>
我正在考虑www.example2.org和www.example1.com指向127.0.0.1即。 本地主机