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 change the address path of the Apache web service directory on the local machine, and how to configure and change the Apache homepage file name.
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 must 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's wwwroot is the htdocs directory under the Apache installation directory. if you want to change the directory location, open 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 http: // localhostname, apachewill open the index.html file. if you want to modify the homepage file or add a homepage file, httpd will still be opened. 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!
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.