Use port mapping to allocate ports to each project in Apache to enable one port to access a website_PHP tutorial

WBOY
Release: 2016-07-13 10:35:50
Original
1101 people have browsed it

The main function of port mapping is that the actual Internet can access the computer currently being mapped. First, we need to perform port mapping on the router. Common open ports are 80, 21, 3389, etc. 80 is the website Commonly used ports, 21 is a common port for FTP servers, and 3389 is a remote desktop connection port. The following will explain the specific method of port mapping in detail!

step1. Open httpd.conf and find the line Listen 80

Add

after

Listen 8080
Listen 8001
Listen 8002
Listen 8003

That is to say, each project occupies one port, just like the software in the computer, each software occupies one port

step2. Find


Options FollowSymLinks
AllowOverride all
Order deny,allow
Deny from all
Satisfy all
Modify to the above content

step3. Add

at the end

NameVirtualHost *:80

DocumentRoot "d:/wamp/www"
ServerName localhost


DocumentRoot "D:/wamp/www/RED4S_V3.0/svn/repos"
ServerName 127.0.0.1:8003

The above means: the project directory of port 8003 is D:/wamp/www/RED4S_V3.0/svn/repos

That is to say, if you want to add any project in the future, you only need to listen to a port first, and then add a at the end. DocumentRoot is the path of the project. . .

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/742174.htmlTechArticleThe main function of port mapping is that the actual Internet can access the computer currently being mapped. First, we need to configure the port of the router. Mapping, common open ports are 80, 21, 3389, etc....
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!