sun博客

记录点滴!

httpd.conf文件中的

Listen 8888
Listen 9999

需要几个虚拟主机就写几个监听端口,如果没有写,不会开启端口线程,查看是否开启

netstat -ano | findstr 9999/8888

httpd-vhosts.conf格式如下

<VirtualHost *:8888>
    #ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "D:/backend/cxl/AppServ/www"
    ServerName localhost
#    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error.log"
#    CustomLog "logs/dummy-host.example.com-access.log" common
     <Directory "D:/backend/cxl/AppServ/www">
	Options Indexes FollowSymLinks
        AllowOverride None
	Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:9999>
    #ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "D:/backend/xxj"
    ServerName localhost
#    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error.log"
#    CustomLog "logs/dummy-host.example.com-access.log" common
     <Directory "D:/backend/xxj">
	Options Indexes FollowSymLinks
        AllowOverride None
	Require all granted
    </Directory>
</VirtualHost>

发表评论

邮箱地址不会被公开。 必填项已用*标注