WAMPServer初试

修改网站目录:

一、Apache -> httpd.conf  (D:\wamp\bin\apache\apache2.4.9\conf)

DocumentRoot "d:/phpsite/"
<Directory "d:/phpsite/">

二、从新启动全部服务

三、www目录换成 phpsite目录

3.1 D:\wamp\wampmanager.ini

[Menu.Left] 下面php

Type: item; Caption: "www 目录"; Action: shellexecute; FileName: "d:/wamp/www"; Glyph: 2

改为:git

Type: item; Caption: "phpsite 目录"; Action: shellexecute; FileName: "d:/phpsite"; Glyph: 2

3.2 D:\wamp\wampmanager.tpl

[Menu.Left] 下面shell

Type: item; Caption: "${w_wwwDirectory}"; Action: shellexecute; FileName: "${wwwDir}"; Glyph: 2

改为:apache

Type: item; Caption: "phpsite 目录"; Action: shellexecute; FileName: "d:/phpsite"; Glyph: 2

3.3 中止全部服务 -> 推出 -> 

 

容许外部访问

一、修改Apache -> httpd.conf

<Directory />
    AllowOverride none
    Require all denied
</Directory>

改为app

<Directory />
    AllowOverride none
    Require all granted
</Directory>

二、修改Apache -> httpd.conf

<Directory "d:/git/">

。。。

Require local

</Directory>

改为ide

<Directory "d:/git/">

。。。

Require all granted

</Directory>

三、修改 phpmyadmin.conf (D:\wamp\alias\phpmyadmin.conf)

<Directory "d:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require local
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
	  Deny from all
	  Allow from localhost ::1 127.0.0.1
	</IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

改为post

<Directory "d:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require all granted
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
	  Allow from all
	</IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>


配置多站点:

一、配置:D:\wamp\bin\apache\Apache2.4.4\conf\extra\httpd-vhosts.conf
增长:

<VirtualHost *:80>
    DocumentRoot "d:/phpsite/site01"
    ServerName site01.com
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "d:/phpsite/site02"
    ServerName site02.com
</VirtualHost>

二、Apache -> httpd.conf。启用扩展配置

#Include conf/extra/httpd-vhosts.conf

改为(去掉#)网站

Include conf/extra/httpd-vhosts.conf

三、Apache -> httpd.conf。容许外部访问

Allow from 127.0.0.1
Allow from localhost
Deny from all

改为ui

#Allow from 127.0.0.1
#Allow from localhost
Allow from all

四、重启全部服务

五、修改:C:\Windows\System32\drivers\etc\hosts

127.0.0.1 localhost
127.0.0.1 site01.com
127.0.0.1 site02.com

修改端口号spa

Apache -> httpd.conf。监听端口

Listen 80
ServerName localhost

改为

Listen 8088
ServerName localhost:8088
相关文章
相关标签/搜索