wamp常用设置

服务器

17-11-6 9:48:35

设置多端口网站

D:\wamp\bin\apache\Apache2.2.21\conf\httpd.conf
Listen 80 下增加  
Listen 81
Listen 82
Listen 83 等等等.

D:\wamp\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf
增加
NameVirtualHost *:80
NameVirtualHost *:81
NameVirtualHost *:82 等等等..
<VirtualHost *:81>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "D:/wamp/w81"
    ServerName w1.co,
    ErrorLog "logs/dummy-host81.example.com-error.log"
    CustomLog "logs/dummy-host81.example.com-access.log" common
</VirtualHost>等等等..


#Include conf/extra/httpd-vhosts.conf  去掉注释
权限问题
<Directory "d:/wamp/www/"> 下的修改 
 Order Deny,Allow
 Deny from all
 Allow from all

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

D:\wamp\alias\phpmyadmin.conf 修改

<Directory "d:/wamp/apps/phpmyadmin3.4.10.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
Deny from all
Allow from all
</Directory>
重启


修改默认浏览器 

\wampmanager.conf   

navigator = "C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe"  

增加菜单选项     

1,\lang\chinese.lang   增加变量  $w_localhost81 = '本地81端口';


2,\wampmanager.ini  在[Menu.Left]下面增加
Type: item; Caption: "Localhost:81"; Action: run; FileName: "C:\Users\Administrator\AppData\Local\Google\Chrome
\Application\chrome.exe"; Parameters: "http://localhost:81/"; Glyph: 5

3,\wampmanager.tpl  在[Menu.Left]下面增加
Type: item; Caption: "${w_localhost81}"; Action: run; FileName: "${c_navigator}"; Parameters: 
"http://localhost:81/"; Glyph: 5

三 实战
1,\lang\chinese.lang 加入
$w_wamp = 'wamp目录'; 
$w_localhost81 = '本地81端口';

2,\wampmanager.ini在[Menu.Left]下面增加
Type: item; Caption: "本地81端口"; Action: run; FileName: "C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe"; Parameters: "http://localhost:81/"; Glyph: 5
Type: item; Caption: "wamp目录"; Action: shellexecute; FileName: "d:/wamp"; Glyph: 2

3 \wampmanager.tpl
[Menu.Left]下增加
Type: item; Caption: "${w_localhost81}"; Action: run; FileName: "${c_navigator}"; Parameters: "http://localhost:81/"; Glyph: 5

Type: item; Caption: "${w_wamp}"; Action: shellexecute; FileName: "d:/wamp"; Glyph: 2



Type: item; Caption: "标题名称"; Action: shellexecute; FileName: "执行路径"; Glyph: 2(菜单图标 无所谓了)


简易办法直接在\wampmanager.tpl[Menu.Left]下增加
Type: item; Caption: "81"; Action: run; FileName: "C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe"; Parameters: "http://localhost:81/"; Glyph: 5
Type: item; Caption: "82"; Action: run; FileName: "C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe"; Parameters: "http://localhost:82/"; Glyph: 5