国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 滦平县| 英山县| 胶南市| 万载县| 浦东新区| 柳江县| 交城县| 汾阳市| 河源市| 隆尧县| 长沙市| 阜平县| 彭泽县| 东莞市| 汉川市| 安丘市| 利川市| 洪江市| 苍南县| 昔阳县| 永泰县| 皮山县| 资源县| 墨脱县| 甘南县| 石楼县| 平度市| 新昌县| 祁阳县| 增城市| 慈利县| 青河县| 台中县| 盐山县| 景泰县| 阿城市| 霍山县| 温宿县| 高平市| 枝江市| 新乐市|