环境:
apache2.2
配置:
1.注册端口,默认为80,可增加或修改,因此次需部署三个网站,因此至少增加两个端口(81,82);
2.将端口和发布路径绑定,新增加两个VirtualHost,
<VirtualHost *:80>ServerName localhost
Documentroot "D:/publish/web"
</virtualHost>
<VirtualHost *:81>
ServerName localhost1
Documentroot "D:/publish/web1"
</virtualHost>
<VirtualHost *:82>
ServerName localhost2
Documentroot "D:/publish/web2"
</virtualHost>
*:80,*:81,*:82即为网站端口;
3.为多个网站发布目录授权,
<Directory "D:/publish/web">Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "D:/publish/web1">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "D:/publish/web2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)