Apache 多端口多站点配置方法
- httpd.conf 文件打开虚拟机配置文件;添加监听端口
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
#Listen 12.34.56.78:80
Listen 8081
Listen 8082
Listen 8083
2)开启虚拟站点
-# Virtual hosts
Include conf/extra/httpd-vhosts.conf
3)检查监听端口
通过netstat -n -a查看端口是否开启
5)httpd-vhosts.conf 指定的文件夹下复制配置文件,在新复制的文件中添加安装的文件夹,如phpwind.conf配置
<VirtualHost :8081>
DocumentRoot /alidata/www/phpwind
ServerName localhost
ServerAlias localhost
<Directory "/alidata/www/phpwind">
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
RewriteEngine On
RewriteRule ^(.
RewriteRule ^(.)/simple/([a-z0-9_]+.html)$ /simple/index.php?
ErrorLog "/alidata/log/httpd/phpwind-error.log"
CustomLog "/alidata/log/httpd/phpwind.log" common
版版权所有:ForrestWang,转载请注明出处!