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
相關文章
相關標籤/搜索