电脑疯子技术论坛|电脑极客社区

 找回密码
 注册

QQ登录

只需一步,快速开始

[linux教程] 配置Apache虚拟主机教程

[复制链接]
zhaorong 发表于 2018-4-19 14:15:08 | 显示全部楼层 |阅读模式

配置Apache虚拟主机

配置Apache虚拟主机。这样就可以实现一个IP地址绑定多个域名。

其意义在于可以用一个IP地址绑定多个网站。这样做:

#httpd.conf


    ServerName 网站1的域名,如example1.xxx.cn
    DocumentRoot "网站1路径"




    Options FollowSymLinks
    AllowOverride None
    Require all granted



    ServerName 网站2的域名,如example2.xxx.cn
    DocumentRoot "网站2路径"



    Options FollowSymLinks
    AllowOverride None
    Require all granted
重启下Apache就OK了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|VIP|电脑疯子技术论坛 ( Computer madman team )

GMT+8, 2025-2-2 22:02

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表