正在加载中...

LINUX服务器怎样创建虚拟主机VirtualHost?

LINUX服务器怎样创建虚拟主机VirtualHost?

使用vi /usr/local/apache/conf/httpd.conf进入apache配置文件

 


<VirtualHost *:80>
    ServerAdmin webmast@wanweiwang.cn
    DocumentRoot /usr/local/apache/htdocs/wanweiwang.cn
    ServerName wanweiwang.cn
    ServerAlias www.wanweiwang.cn
    DocumentRoot /usr/local/apache/htdocs/wanweiwang.cn
    <Directory "/usr/local/apache/htdocs/wanweiwang.cn">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    ErrorLog logs/wanweiwang.cn-error_log
    CustomLog logs/wanweiwang.cn-access_log common
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin webm@hostu.cn
    ServerName hostu.cn
    ServerAlias www.hostu.cn
    DocumentRoot /usr/local/apache/htdocs
    <Directory "/usr/local/apache/htdocs">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    ErrorLog logs/hostu.cn-error_log
    CustomLog logs/hostu.cn-access_log common
</VirtualHost>

 

 


返回上一页