search
Homephp教程php手册修改wamp的apache默认端口80以及www目录

修改wamp的apache默认端口80以及www目录

以修改为8088端口和D:/workphp目录为例。

 

左键托盘图标,在“Apache”里可以直接打开httpd.conf,查找到“Listen 80”,可以改成其他端口,我选用8088。

 

重启wamp,就可以生效了。但是“Localhost”、“phpMyAdmin”、“SQLiteManager”,你可以点击打开看到依旧是默认的80端口。找到wamp安装目录下的wampmanager.tpl文件,记事本打开:

 

在localhost后面添加8088端口,保存,退出并重新打开wamp生效。(其实,wampmanager.ini文件中的类似的URL地址也随之更改了)

 

(1)需要修改Apache的httpd.conf文件,有2处修改

 

 

 

在D:/workphp目录下随便建一个txt文件,写点内容,重启Apache即在http://localhost:8088中看到,txt的内容。但是www目录依旧指向的是默认位置。这就需要修改wamp安装目录下的wampmanager.tpl和wampmanager.ini文件。

(2)wampmanager.tpl文件,修改如下

 

wampmanager.ini文件,修改如下

 

 

通过以上的修改,可以发现端口8088可以使用,而且Localhost、phpMyAdmin、SQLiteManager指向都是正确的,www目录也指向我们想设置的位置。

 

 参考资料:(1)http://bbs.php100.com/read-htm-tid-48600.html

                (2)http://konglx.javaeye.com/blog/507762

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version