Solution to the problem that Apache cannot start in Xampp
xampp (apache+mysql+php+perl) is a powerful website building integration software package. Many people know from their own experience that installing an Apache server is not an easy task. If you want to add MySQL, PHP, and Perl, it's even harder. Using xampp, you can easily build a running environment for PHP and other programs under various systems.
Xampp is very simple to obtain and install. You only need to go to the following website:
http://www.apachefriends.org/zh_cn/xampp.html to download xampp. I installed the windows version Installer installation package, just follow its installation prompts to install it, which is very convenient and fast.
However, it is best to choose a disk other than the C drive for the installation directory. According to the experience of some netizens, in Windows 7 or Vista, if you choose the C drive for installation, there will be a problem of failure to create some files due to permission reasons. If you already have the highest authority, you can install it directly on the C drive.
Generally in Windows XP or Windows 7, when xampp is just installed, the apache server cannot be started.
busy...
apache started [port 80]
After checking the information from many parties, it turned out that the reason was that port 80 was blocked. Other programs occupy it, so this port is very busy, causing Apache to fail to start. Solution one is as follows:
1. Run -cmd, then enter netstat -ano and press Enter;
2. Check the pid of the line containing xx.xx.xx.xx:80 in the local address. It is a few numbers. Write down these numbers;
3. Start "Task Manager" - "Details", find the corresponding "PID", and "End Task";
4. Then check which program corresponds to the pid just now, It is easy to find, that is, it occupies port 80;
5. Stop it directly or use tools such as Optimization Master to prevent it from starting up.
Okay, it’s ready to use.
Second solution: Change the port (Try not to use ports 0-1023, this is a system reserved port)
The iis server used by my asp is the default web80 port of xp, and the tomcat server used by jsp. It is the default port 8080 when tomcat is installed. Then I will change the default port 80 of apache in xampp under php to 8081 (any other port will be fine as long as it is not occupied). Otherwise, everything else will be ok
In this case, how to modify it What about the apache port? Go to the installation directory of ServerName localhost:8081
Then restart apache in XAMPP Control Panel.
Why is it still displayed as follows:
busy...
apache started [port 80]
Never mind it, enter the address in IE: http://localhost:8081 to test, it cannot be opened, I have modified the apache port. , try to stop the iis web service. Start
apache again. It also displays as follows:
busy…
apache started [port 80]
Enter the address in IE: http://localhost:8081 to test and successfully open the xampp web page. The prompt:
Welcome to XAMPP for Windows Version 1.7.0!
Congratulations You:
You have successfully installed XAMPP!
Although the xampp-control dialog box still shows that apache has started port 80, the actual occupied port is 8081. Restart the iis service, and both apache and iis can work on their respective ports 8081 and 80.
Restart the computer, apache cannot be used again, try to close the iis service, start apache -> http://localhost:8081 test is successful; then start the iis service,
http://localhost:8081 test is successful
It’s really a What a strange debugging process. Anyway, it works.
Start apache directly with xamppapache_start.bat, and a prompt appears that port 443 is occupied. It turns out that IIS occupies the ssl port (that is, port 443 https). This is easy to handle. Modify xamppxamppapacheconfextrahttpd -ssl.conf file, change all 443 to 4433 or turn off the ssl service, test again and everything is ok.
Of course, as a development and debugging environment, if the SSL service is not needed, the SSL service can be turned off. The method is to modify the xamppapacheconfhttpd.conf file, find "Includeconf/extra/httpd-ssl.conf" and comment it out with the # character to turn off the SSL service.
Writing while doing the debugging process of running, indicating that the startup was not successful.
Solution:
1. Start apache in the xampp control panel if the startup fails.
2. Enter the apache directory under the xampp installation directory, such as c:xamppapachelogs
3. You can see an error.log file.
4. Open the file and go to the end of the file to learn more about the reason for the startup failure.
5. Find solutions to different reasons for failure.
Solution to the case
1. Failed to start apache in the xampp control panel
2. Check the error.log, it shows "make_sock: could not bind to address0.0.0.0:80
no listening sockets available shutting down"
3. Yes It seems that this is a mistake when listening to port 80. Maybe port 80 is already occupied by other applications. The failure to start apache is mostly due to port issues.
4. Open the c:xamppapacheconf directory
5. There is a httpd.cnf file in the directory. Open it with Notepad and change all "80" inside to other ports such as "8082". After modification, save and exit.
6. Re-start apache in the xampp control panel. It is successful and the status is running.
Note: Because the default port of the browser is 80, after modifying the listening port of apache, when browsing in the browser, you need to add localhost after port. For example, http://localhost:8082/ replaces the previous http://localhost/. Of course, localhost= 127.0.0.1, the same as http://127.0.0.1:8082/.
The above introduces the solution to the problem that Apache cannot start in Xampp, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











To set up a CGI directory in Apache, you need to perform the following steps: Create a CGI directory such as "cgi-bin", and grant Apache write permissions. Add the "ScriptAlias" directive block in the Apache configuration file to map the CGI directory to the "/cgi-bin" URL. Restart Apache.

Apache connects to a database requires the following steps: Install the database driver. Configure the web.xml file to create a connection pool. Create a JDBC data source and specify the connection settings. Use the JDBC API to access the database from Java code, including getting connections, creating statements, binding parameters, executing queries or updates, and processing results.

There are 3 ways to view the version on the Apache server: via the command line (apachectl -v or apache2ctl -v), check the server status page (http://<server IP or domain name>/server-status), or view the Apache configuration file (ServerVersion: Apache/<version number>).

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

How to view the Apache version? Start the Apache server: Use sudo service apache2 start to start the server. View version number: Use one of the following methods to view version: Command line: Run the apache2 -v command. Server Status Page: Access the default port of the Apache server (usually 80) in a web browser, and the version information is displayed at the bottom of the page.

How to configure Zend in Apache? The steps to configure Zend Framework in an Apache Web Server are as follows: Install Zend Framework and extract it into the Web Server directory. Create a .htaccess file. Create the Zend application directory and add the index.php file. Configure the Zend application (application.ini). Restart the Apache Web server.

Apache cannot start because the following reasons may be: Configuration file syntax error. Conflict with other application ports. Permissions issue. Out of memory. Process deadlock. Daemon failure. SELinux permissions issues. Firewall problem. Software conflict.

To delete an extra ServerName directive from Apache, you can take the following steps: Identify and delete the extra ServerName directive. Restart Apache to make the changes take effect. Check the configuration file to verify changes. Test the server to make sure the problem is resolved.
