网站运营
位置:首页>> 网站运营>> Apache 多站点虚拟主机配置方法

Apache 多站点虚拟主机配置方法

  发布时间:2023-07-05 05:57:49 

标签:Apache,多站点,虚拟主机

修改配置文件 conf/httpd.conf
1.加入下面两句
NameVirtualHost *:80
Include conf/vhosts
2.在conf目录中建立vhosts目录
然后在 vhosts 目录下面建立相应的站点配置文件
如建立 hhj.aspxhome.com.conf 文件
内容:


<VirtualHost *:80>
ServerAdmin hhj@live.it
ServerName www.hhj.aspxhome.com
ServerAlias hhj.aspxhome.com
DocumentRoot "F:\wwwroot\hhj.aspxhome.com"
DirectoryIndex index.html index.htm index.php
ErrorLog logs/hhj.aspxhome.com-error_log.log
CustomLog logs/hhj.aspxhome.com-access_log.log common
<Directory "F:\wwwroot\hhj.aspxhome.com">
AllowOverride All
Options FollowSymLinks
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>


3.重启apache服务

0
投稿

猜你喜欢

手机版 网站运营 asp之家 www.aspxhome.com