国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發(fā)設計 > 正文

wamp多站點配置

2019-11-14 14:47:27
字體:
來源:轉載
供稿:網(wǎng)友

網(wǎng)上方法五花白門,特意記錄一下,需要的朋友自行拿去就好。

需要修改的文件:httpd.conf / httpd-vhosts.conf / hosts

對應路徑:

httpd.conf:wamp/bin/apache/Apache2.2.21/conf

httpd-vhosts.conf:wamp/bin/apache/Apache2.2.21/conf/extra

hosts:c/Windows/System32/drivers/etc

修改流程:

1,打開httpd.conf,約466行:#Include conf/extra/httpd-info.conf,刪除#;

2,還是httpd.conf,約188行:

<Directory />
  Options FollowSymLinks
  AllowOverride None
  Order deny,allow
  Deny from all
</Directory>

改為:

<Directory />
  Options FollowSymLinks
  AllowOverride None
  Order deny,allow
  #Deny from all
  Allow from all
  #允許所有訪問
  Satisfy all
</Directory>

3,打開httpd-vhosts.conf,在最下方空白處添加以下代碼(自行修改wamp安裝路徑):

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "f:/wamp/www"
    ServerName localhost
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "f:/wamp/www2"
    ServerName www2.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

4,最后一步:打開hosts文件,在最后一行下面添加以下代碼:

127.0.0.1       localhost

127.0.0.1       www2.com

重啟wamp之后,localhost與www2.com即可區(qū)分開發(fā),多站點配置成功。


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 芜湖县| 寿阳县| 水富县| 汝南县| 昭苏县| 拜泉县| 南通市| 盐津县| 南安市| 焦作市| 嫩江县| 北流市| 湟源县| 酉阳| 崇明县| 洪江市| 新蔡县| 缙云县| 抚宁县| 简阳市| 射阳县| 思南县| 抚州市| 府谷县| 衢州市| 东乡县| 德钦县| 安塞县| 河西区| 赣州市| 重庆市| 池州市| 松原市| 姜堰市| 恭城| 嘉祥县| 南宁市| 东台市| 鹿邑县| 武城县| 兴山县|