Change the configuration modification methods such as Apache Port

Source: Internet
Author: User
Today, I would like to add that the previous two topics have not been discussed in detail, however, it is important to know how to change the Apache port, how to change the IIS port, how to configure, and how to change the address path of the Apache Web service directory on the local machine.

Today, I would like to add that the previous two topics have not been discussed in detail, however, it is important to know how to change the Apache port, how to change the IIS port, how to configure, and how to change the address path of the Apache Web service directory on the local machine.

How to change the Apache port: Find the httpd. conf file in the conf directory under the Apache installation directory. Open it, find "Listen", and the number of Listen is the port number. The default status is "Listen 80 ". In the previous PHP topic, we mentioned that during installation and configuration of Apache, the port may conflict with the HTTP port of IIS, because the HTTP port of IIS is also 80 by default. Then we can change the Apache port here to avoid conflicts. For example, we can change it to Listen 8011. After modification, do not forget to restart the Apache service to make the configuration take effect.

How to change the IIS port: If you want to retain both Apache and IIS services, and do not want to change the default port 80 of Apache, you only need to change the IIS port. Start> RUN> input: inetmgr-> Internet Information Service-> Local Computer-> website-> right-click "default website"-> properties-> select "website" tag-> modify TCP port. Finally, do not forget to restart the IIS service.

How to configure and change the address path of the Apache Web service directory on the local machine: by default, Apache wwwroot is the htdocs directory under the Apache installation directory. If you want to change the directory location, enable httpd. conf, find DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" and , Modify the two paths to the location you specified. (The red part is the path on the author's computer for reference only .) Restart the Apache service.

How to configure and change the Apache homepage file name: When you enter an example, apachewill open the index.html file. If you want to modify the homepage file or add a homepage file, you will still open httpd. conf, find DirectoryIndex index.html, and modify index.html. You just need a file name, such as main. php. If you want to add multiple homepage files, they can be separated by spaces. The order before and after the files is the priority for reading the homepage files. Restart the Apache service.

Now, after learning about 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.