Home > Backend Development > PHP Tutorial > How to modify configurations such as changing the Apache port_PHP tutorial

How to modify configurations such as changing the Apache port_PHP tutorial

WBOY
Release: 2016-07-21 15:52:32
Original
804 people have browsed it

How to change the Apache port : Find the httpd.conf file in the conf directory under the Apache installation directory. Open it and find "Listen". The number next to Listen is the port number, which is "Listen 80" by default. In the previous PHP topic, we mentioned that when installing and configuring Apache, we will encounter the problem of port conflict with the IIS HTTP port, because the IIS HTTP port is also 80 by default. Then we can change the Apache port here to avoid conflicts, for example, it can be changed to: Listen 8011. After making the changes, don’t forget to restart the Apache service for the configuration to take effect.

How to change the IIS port: If you want to keep the Apache service and the IIS service at the same time, but do not want to change the default port 80 of Apache, then the only way is to change the IIS port. Start->Run->Enter: inetmgr->Internet Information Services->Local Computer->Website->Right-click "Default Website"->Properties->Select the "Website" tab->Modify Just the TCP port. Finally, don’t forget to restart the IIS service.

How to configure and change the address path of the Apache web service directory on this machine : By default, Apache's wwwroot is the htdocs directory under the Apache installation directory. If you want to change the location of this directory , then open httpd.conf and find DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" and , just modify two of the paths to the locations you specify. (The red part is the path in the author's computer, for reference only.) Restart the Apache service.

How to configure and change the Apache homepage file name: When you enter, for example, http://localhost, Apache will open the index.html file by default. If you want to modify the homepage file or add a homepage file , still open httpd.conf, find DirectoryIndex index.html, and modify index.html to the file name you want, such as main.php. If you want to add multiple homepage files, you can separate them with spaces. The order of the files is the priority of reading the homepage files. Restart the Apache service.

Okay, after understanding these basic configuration methods and concepts, we can make our system more smoothly!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318955.htmlTechArticleHow to change the Apache port: Find the httpd.conf file in the conf directory under the Apache installation directory. Open it and find "Listen". The number next to Listen is the port number. By default, it is...
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