wamp环境配置多站点-window (wamp环境变量配置)

文章编号:11515 更新时间:2024-03-16 分类:互联网资讯 阅读次数:

资讯内容

在进行Apache服务器配置时,需要对httpd.conf和httpd-vhosts.conf文件进行相关修改。具体步骤如下:

打开binapacheApache2.2.17confhttpd.conf文件,检查第61行的配置项LoadModule alias_module modules/mod_alias.so前是否有#注释符号。如果有,需要去除#符号以启用alias支持。

找到httpd.conf文件的第446行,该行配置项为#Include conf/extra/httpd-vhosts.conf。需要去掉该行前面的#符号,以确保Apache服务器能够读取extra/httpd-vhosts.conf文件。

接下来,打开binapacheApache2.2.17confextrahttpd-vhosts.conf文件,删除底部默认的一些配置,然后根据以下方式添加多个站点配置:

1、多IP多端口多站点配置:

Listend172.20.30.40:80

Listend172.20.30.40:8080

Listend172.20.30.50:80

Listend172.20.30.50:8080


DocumentRoot /www/example1-80
html" target="_blank">ServerName www.example1.com


DocumentRoot /www/example1-8080
ServerName www.example1.com


DocumentRoot /www/example2-80
ServerName www.example1.org


DocumentRoot /www/example2-8080
ServerName www.example2.org

2、多IP单端口多站点配置:


DocumentRoot /usr/local/apache/a
ServerName www.a.com
ServerAlias a.com
DirectoryIndex index.html index.php

NameVirtualHost 192.168.1.2:80


DocumentRoot /usr/local/apache/b
ServerName www.b.com
ServerAlias b.com
DirectoryIndex index.php


DocumentRoot /usr/local/apache/c
ServerName www.c.com
ServerAlias c.com
DirectoryIndex index.php

3、单IP单端口多站点配置:

Listend 80

NameVirtualHost 192.168.1.15


ServerAdmin test@test.com
DocumentRoot D:/Inet

标签: windowwamp环境配置多站点

本文地址: https://yihaiquanyi.com/article/02eeb507feb1589448df.html

上一篇:美国服务器推荐RAKsmart服务器美国服务器哪...
下一篇:推荐支持Nodejs的美国云服务器推荐支持谷歌...

发表评论