Problems encountered in the installation and deployment of Apache and PHP

Problems encountered in the installation and deployment of Apache and PHP

Please refer to the following blog post for the installation process:
https://blog.csdn.net/sinat_41883985/article/details/106061125
https://blog.csdn.net/galen2016/article/details/80778662?
But it appears that Apache can run normally but localhost Cannot access the page!
Insert picture description here

Solution:
In fact, it can be solved by modifying it. . .
Note:
1. When modifying the root directory of the web file, be sure to open the httpd.conf file in the conf subdirectory of the installation directory and modify the DocumentRoot attribute to: DocumentRoot "E:/web/php".
And also define the permissions for the corresponding directory, otherwise an error message that you don’t have permission will appear.
About the next line of DocumentRoot, modify it to:
<Directory ""E:/web/php">
Options Indexes FollowSymLinks
AllowOverride None
Allow from all

2. When modifying the port number, pay attention to whether the port number used is already occupied. It must be modified in the httpd.conf file to: ServerName localhost:8888 (8888 is my port number)

3. There is a PHP error: PHP Warning: PHP Startup: Unable to load dynamic library'pgsql', etc. The
reason is that these extensions are loaded repeatedly. Open the php.ini file and comment out the corresponding extensions.

Guess you like

Origin blog.csdn.net/m0_45142084/article/details/108911418