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 <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">, modify the two paths to the specified location. (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!