Change Apache port Configuration Modification Method _php Foundation

Source: Internet
Author: User
How to change the Apache port: Locate the httpd.conf file under the Conf directory under the Apache installation directory. Open it, find "Listen", and the Listen number is the port number, and the default state is "Listen 80". The previous PHP project mentioned that there was a problem with ports and IIS HTTP ports when installing Apache configuration because the IIS HTTP port defaults to 80. Then we can change the Apache port here to avoid conflicts, such as: Listen 8011. Do not forget to restart the Apache service to make the configuration effective.

How to change the IIS port: If you want to keep the Apache service and the IIS service at the same time, and do not want to change the Apache default 80 port, then only change the port of IIS. Start-> run-> input: inetmgr->internet Information Services-> Local Computer-> Web site-> the "Default Web Site"-> properties-> Select the Web Site tab-> Modify the TCP port. Finally, don't forget to restart the IIS service.

How to configure the address path to change the Apache Web service directory on this computer: The default state, Apache wwwroot for Apache installation of the Htdocs directory, if you want to change the location of this directory, then still open httpd.conf, find DocumentRoot "C:/Program Files/apache Software Foundation/apache2.2/htdocs "and <directory" C:/Program Files/apache Software Foundation/apache2.2/htdocs " Modify the two paths to the location you specified. (The red part is the path of the writer's computer, only as a reference.) ) to restart the Apache service.

How to configure change Apache home file name: When you enter for example http://localhost, Apache will open the index.html file by default, if you want to modify the first file or add the first document, still open httpd.conf, find DirectoryIndex index.html, modify index.html for you want the filename, such as main.php. If you want to add more than one home file, you can use space to separate, the file before and after the order is the first page file reading priority. Start the Apache service again.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.