


WAMP common environment configuration
Foreword: WAMP often requires customized configuration when using it. Here are some common configurations.
Customize the website directory
Modify the directory location
As shown below, open the httpd.conf file.
Find DocumentRoot (two places) and make the following modifications:
#demo为自定义网站目录,下面不再说明DocumentRoot "f:/demo"<Directory "F:/demo">
Restart the configuration service.
Test: Open the browser and enter localhost/test.php (test.php is a newly created test file in the demo directory)
Modify the interface display
Modify the wamp installation directory The wampmanager.ini file under:
[Menu.Left]...... Type: item; Caption: "www 目录"; Action: shellexecute; FileName: "F:/wamp/www"; Glyph: 2替换为: Type: item; Caption: "demo 目录"; Action: shellexecute; FileName: "F:/demo"; Glyph: 2......
Then modify the wampmanager.tpl file under the wamp installation directory:
[Menu.Left]...... Type: item; Caption: "${w_wwwDirectory}"; Action: shellexecute; FileName: "${wwwDir}"; Glyph: 2替换为: Type: item; Caption: "${demo 目录}"; Action: shellexecute; FileName: "${F:/demo}"; Glyph: 2......
Restart the configuration service.
Multi-site configuration
Open the bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf file in the wamp installation directory. (Virtual DirectoryConfiguration File)
Add the following code:
//添加站点,test01和test02目录下放置网站文件<VirtualHost *:80> ServerAdmin webmaster@dummy-host2.example.com //邮箱地址,可不写 DocumentRoot "f:/demo/test01" //网站文件目录 ServerName test01.com //主机名 ErrorLog "logs/dummy-host2.example.com-error.log" //错误日志,可不写 CustomLog "logs/dummy-host2.example.com-access.log" common //日常日志,可不写</VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@dummy-host2.example.com //邮箱地址,可不写 DocumentRoot "f:/demo/test02" //网站文件目录 ServerName test02.com //主机名 ErrorLog "logs/dummy-host2.example.com-error.log" //错误日志,可不写 CustomLog "logs/dummy-host2.example.com-access.log" common //日常日志,可不写</VirtualHost>
As above, open the httpd.conf file again and make the following modifications:
# Virtual hosts#Include conf/extra/httpd-vhosts.conf替换为# Virtual hostsInclude conf/extra/httpd-vhosts.conf
//有些版本没有,则不用修改Deny from all Allow from 127.0.0.1替换为: Allow from all#Allow from 127.0.0.1
Restart the service
Open C:\Windows\System32\drivers\etc\hosts and add:
//添加站点127.0.0.1 test01.com127.0.0.1 test02.com
Test: Open the browser and enter test01.com and test02.com. (Test files need to be written in these two directories in advance)
Custom port number
apache defaults to port 80. If it is occupied, the port number needs to be modified.
As above, open the httpd.conf file and make the following modifications:
Listen 80替换为:Listen 8080(或改成其它未被占用端口号)
ServerName localhost:80替换为:ServerName localhost:8080(与上面修改的端口号要一致)
Restart the service.
Test: localhost:8080/test.php (the test file created earlier is in the demo directory).
The above is the detailed content of Detailed introduction to WAMP common environment configuration example code 9 (picture). For more information, please follow other related articles on the PHP Chinese website!

Win11系统作为最新的Windows操作系统,用户们在使用时可能会遇到一些配置问题。其中,配置Python环境变量是一个常见的需求,因为它可以让用户在任何位置轻松地使用Python命令。本文将介绍如何在Win11系统中配置Python环境变量,以便于用户能够更方便地使用Python编程语言。1、桌面【右键】点击此电脑,在打开的菜单项中,选择【属性】;2、接着,相关链接下,找到并点击【高级系统设置】;3、系统属性窗口,点击下方的【环境变量】;4、环境变量窗口,系统变量下,选择【Path】,再点击

Go语言是一种由Google开发的静态类型、编译型的编程语言。它在现代编程语言中拥有独特的地位,被广泛应用于云计算、网络编程、大数据等领域。随着Go语言的逐渐流行,越来越多的程序员开始学习Go语言,希望能够掌握这门语言的特性和应用技巧。然而,对于零基础的学习者来说,Go语言的环境配置常常成为他们学习的第一个障碍。在学习Go语言之前,我们首先需要搭建一个适合的

本文涉及两款php的集成环境,这两款都含mysql + apache + php,phpstudy的功能比wamp要强大,并且十分简单容易上手。

Go语言作为一种开源的编程语言,被越来越多的开发者所青睐。它的简洁性、高效性以及跨平台性受到了广泛的好评。在学习和使用Go语言之前,首先需要进行环境配置,才能顺利进行开发工作。本文将为大家提供一份全面的Go语言环境配置攻略,一步步教你搭建开发环境,让你轻松上手Go语言开发。一、安装Go语言首先,我们需要下载并安装Go语言的最新版本。你可以在Go官方网站上找到

PyCharm是众多Python开发者常用的集成开发环境(IDE),它提供了丰富的功能和工具,方便开发者高效地编写、调试和测试Python代码。在使用PyCharm进行开发之前,重要的一步就是对PyCharm环境进行配置。本文将为Python开发者提供PyCharm环境配置指南,包括安装PyCharm、配置Python解释器、设置虚拟环境等内容,同时会附带具

随着互联网的快速发展,开发人员的任务也随之多样化和复杂化。特别是对于PHP语言开发人员而言,在开发过程中面临的最常见问题之一就是在开发环境和生产环境中,数据不一致的错误问题。因此,在开发PHP应用程序时,如何处理这些错误是开发人员必须面对的一个重要问题。开发环境和生产环境的区别首先需要明确的是,开发环境和生产环境是不同的,它们有着不同的设置和配置。在开发环境

Maven环境配置教程:快速上手配置步骤Maven是一个强大的项目管理工具,它可以帮助开发人员自动构建项目、管理依赖、执行测试等。在学习和使用Java开发时,配置Maven环境是一个必备的技能。本文将向您介绍如何快速上手配置Maven环境,包括安装Maven、配置环境变量、创建项目等一系列步骤,并提供具体的代码示例帮助您更好地理解。第一步:下载和安装Mave

Mac电脑是许多开发者钟爱的工作平台,而Golang作为一种高效的编程语言,也受到了越来越多人的喜爱。本文将详细介绍如何在Mac电脑上配置和安装Golang的开发环境,同时提供具体的代码示例,帮助读者快速入门和使用Golang进行开发。步骤一:下载Golang安装包首先,我们需要从Golang官方网站(https://golang.org/dl/)下载适用于


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Linux new version
SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version
Useful JavaScript development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
