Khắc phục lỗi không khởi động được Apache server khi cài đặt XAMPP trên Windows

Một số người bạn của mình có hỏi là tại sao khi cài đặt XAMPP rồi không thể khởi động được apache.

1

Mấy dòng chữ đỏ nó như thế này:

[Apache] Problem detected!
[Apache] Port 443 in use by ""C:\Program Files (x86)\VMware\VMware Workstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml"" with PID 2064!
[Apache] Apache WILL NOT start without the configured ports free!
[Apache] You need to uninstall/disable/reconfigure the blocking application
[Apache] or reconfigure Apache and the Control Panel to listen on a different port

Lý do chủ yếu là do xung đột cổng 80 hoặc 443 của apache. Đa số các bạn cài XAMPP lên máy tính đều là lập trình viên, đo đó trên máy thường có các phần mềm khác có khả năng sử dụng chung cổng với Apache như Skype (chung cổng 80), VMWare (chung cổng 443).

Để giải quyết xung đột cổng, đơn giản là ta cho Apache sử dụng 1 cổng khác ngoài 80 hoặc 443.

Để đổi cổng 443, trong XAMPP Control Panel các bạn chọn nút config của apache, sau đó chọn httpd-ssl.conf như hình sau:

2

Lúc này sẽ mở ra một file text, các bạn tìm đến dòng

Listen 443

Các bạn sửa lại thành một số tùy thích, ở đây tôi sửa thành 8443.

Save lại, tắt file text đi và start Apache thôi. Nếu vẫn không được có thể bạn phải đổi cả cổng 80 nữa. Vẫn trong menu của nút config, chọn file httpd.conf tìm đến dòng Listen 80 và sửa lại thành một con số khác, ví dụ 8088. Save và start apache.

Nếu vẫn không được các bạn có thể để lại comment tại đây mình sẽ cố gắng hỗ trợ nếu có thể.

Cập nhật: Có nhiều bạn comment là đổi port rồi nhưng vẫn không được, mình có tìm hiểu thêm 1 trường hợp như sau các bạn có thể thử:

  • Vào menu Start của Windows, gõ services.msc
  • Tìm đến World Wide Web Publishing Service
  • Click chuột phải và chọn STOP
  • Khởi động lại XAMPP
Advertisements

15 thoughts on “Khắc phục lỗi không khởi động được Apache server khi cài đặt XAMPP trên Windows

  1. Nếu đã đổi cả 2 cổng 80 và 443 mà vẫn không được thì có thể không phải do xung đột cổng rồi. Bạn có xem thông báo lỗi cụ thể như thế nào không?

    1. Tấn Tài

      Đã đổi 2 cổng rồi vẫn bị còn cách nào khac 1 ko zậy
      Problem detected!
      12:14:33 PM [Apache] Port 80 in use by “Unable to open process” with PID 4!
      12:14:33 PM [Apache] Apache WILL NOT start without the configured ports free!
      12:14:33 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
      12:14:33 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port

  2. binh

    1:03:43 PM [Apache] Error: Apache shutdown unexpectedly.
    1:03:43 PM [Apache] This may be due to a blocked port, missing dependencies,
    1:03:43 PM [Apache] improper privileges, a crash, or a shutdown by another method.
    1:03:43 PM [Apache] Press the Logs button to view error logs and check
    1:03:43 PM [Apache] the Windows Event Viewer for more clues
    1:03:43 PM [Apache] If you need more help, copy and post this
    1:03:43 PM [Apache] entire log window on the forums
    1:04:46 PM [Apache] Problem detected!
    1:04:46 PM [Apache] Port 80 in use by “Unable to open process” with PID 4!
    1:04:46 PM [Apache] Apache WILL NOT start without the configured ports free!
    1:04:46 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    1:04:46 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port.

    ban ơi nó bị như vầy nè bạn.doi port r cung k dc

  3. thắng

    mình bị lỗi này nak bạn mà không vô được

    Error: Apache shutdown unexpectedly.
    10:22:45 PM [Apache] This may be due to a blocked port, missing dependencies,
    10:22:45 PM [Apache] improper privileges, a crash, or a shutdown by another method.
    10:22:45 PM [Apache] Press the Logs button to view error logs and check
    10:22:45 PM [Apache] the Windows Event Viewer for more clues
    10:22:45 PM [Apache] If you need more help, copy and post this
    10:22:45 PM [Apache] entire log window on the forums

    1. Phúc

      Error: Apache shutdown unexpectedly.
      10:31:48 PM [Apache] This may be due to a blocked port, missing dependencies,
      10:31:48 PM [Apache] improper privileges, a crash, or a shutdown by another method.
      10:31:48 PM [Apache] Press the Logs button to view error logs and check
      10:31:48 PM [Apache] the Windows Event Viewer for more clues
      10:31:48 PM [Apache] If you need more help, copy and post this
      10:31:48 PM [Apache] entire log window on the forums

  4. truong

    giúp mình lỗi này với Problem detected!
    10:55:45 AM [Apache] Port 80 in use by “Unable to open process” with PID 4556!
    10:55:45 AM [Apache] Apache WILL NOT start without the configured ports free!
    10:55:45 AM [Apache] You need to uninstall/disable/reconfigure the blocking application
    10:55:45 AM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    10:55:45 AM [Apache] Problem detected!
    10:55:45 AM [Apache] Port 443 in use by “Unable to open process” with PID 4556!
    10:55:45 AM [Apache] Apache WILL NOT start without the configured ports free!
    10:55:45 AM [Apache] You need to uninstall/disable/reconfigure the blocking application
    10:55:45 AM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    10:55:45 AM [Apache] Attempting to start Apache app…
    10:55:45 AM [Apache] Status change detected: running
    10:55:45 AM [Apache] Status change detected: stopped
    10:55:45 AM [Apache] Error: Apache shutdown unexpectedly.
    10:55:45 AM [Apache] This may be due to a blocked port, missing dependencies,
    10:55:45 AM [Apache] improper privileges, a crash, or a shutdown by another method.
    10:55:46 AM [Apache] Press the Logs button to view error logs and check
    10:55:46 AM [Apache] the Windows Event Viewer for more clues
    10:55:46 AM [Apache] If you need more help, copy and post this
    10:55:46 AM [Apache] entire log window on the forums

  5. Vân Anh

    Initializing Modules
    9:41:24 PM [Apache] Problem detected!
    9:41:24 PM [Apache] Port 80 in use by “”C:\Bitnami\WAMPST~1.30-\apache2\bin\httpd.exe” -k runservice” with PID 1744!
    9:41:24 PM [Apache] Apache WILL NOT start without the configured ports free!
    9:41:24 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    9:41:24 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    9:41:24 PM [Apache] Problem detected!
    9:41:24 PM [Apache] Port 443 in use by “”C:\Bitnami\WAMPST~1.30-\apache2\bin\httpd.exe” -k runservice” with PID 1744!
    9:41:24 PM [Apache] Apache WILL NOT start without the configured ports free!
    9:41:24 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    9:41:24 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    9:41:24 PM [mysql] Problem detected!
    9:41:24 PM [mysql] Port 3306 in use by “C:\Bitnami\wampstack-5.6.30-1\mysql\bin\mysqld.exe –defaults-file=C:\Bitnami\wampstack-5.6.30-1/mysql\my.ini wampstackMySQL”!
    9:41:24 PM [mysql] MySQL WILL NOT start without the configured ports free!
    9:41:24 PM [mysql] You need to uninstall/disable/reconfigure the blocking application
    9:41:24 PM [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
    9:41:24 PM [main] Starting Check-Timer
    9:41:24 PM [main] Control Panel Ready
    9:46:54 PM [mysql] Problem detected!
    9:46:54 PM [mysql] Port 3306 in use by “C:\Bitnami\wampstack-5.6.30-1\mysql\bin\mysqld.exe –defaults-file=C:\Bitnami\wampstack-5.6.30-1/mysql\my.ini wampstackMySQL”!
    9:46:54 PM [mysql] MySQL WILL NOT start without the configured ports free!
    9:46:54 PM [mysql] You need to uninstall/disable/reconfigure the blocking application
    9:46:54 PM [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
    9:46:54 PM [mysql] Attempting to start MySQL app…
    9:46:54 PM [mysql] Status change detected: running
    9:46:58 PM [Apache] Problem detected!
    9:46:58 PM [Apache] Port 80 in use by “”C:\Bitnami\WAMPST~1.30-\apache2\bin\httpd.exe” -k runservice” with PID 1744!
    9:46:58 PM [Apache] Apache WILL NOT start without the configured ports free!
    9:46:58 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    9:46:58 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    9:46:58 PM [Apache] Problem detected!
    9:46:58 PM [Apache] Port 443 in use by “”C:\Bitnami\WAMPST~1.30-\apache2\bin\httpd.exe” -k runservice” with PID 1744!
    9:46:58 PM [Apache] Apache WILL NOT start without the configured ports free!
    9:46:58 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    9:46:58 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    9:46:58 PM [Apache] Attempting to start Apache app…
    9:46:59 PM [Apache] Status change detected: running
    9:46:59 PM [Apache] Status change detected: stopped
    9:46:59 PM [Apache] Error: Apache shutdown unexpectedly.
    9:46:59 PM [Apache] This may be due to a blocked port, missing dependencies,
    9:46:59 PM [Apache] improper privileges, a crash, or a shutdown by another method.
    9:46:59 PM [Apache] Press the Logs button to view error logs and check
    9:46:59 PM [Apache] the Windows Event Viewer for more clues
    9:46:59 PM [Apache] If you need more help, copy and post this
    9:46:59 PM [Apache] entire log window on the forums
    9:47:01 PM [Apache] Problem detected!
    9:47:01 PM [Apache] Port 80 in use by “”C:\Bitnami\WAMPST~1.30-\apache2\bin\httpd.exe” -k runservice” with PID 1744!
    9:47:01 PM [Apache] Apache WILL NOT start without the configured ports free!
    9:47:01 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    9:47:01 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    9:47:01 PM [Apache] Problem detected!
    9:47:01 PM [Apache] Port 443 in use by “”C:\Bitnami\WAMPST~1.30-\apache2\bin\httpd.exe” -k runservice” with PID 1744!
    9:47:01 PM [Apache] Apache WILL NOT start without the configured ports free!
    9:47:01 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    9:47:01 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    9:47:01 PM [Apache] Attempting to start Apache app…
    9:47:02 PM [Apache] Status change detected: running
    9:47:02 PM [Apache] Status change detected: stopped
    9:47:02 PM [Apache] Error: Apache shutdown unexpectedly.
    9:47:02 PM [Apache] This may be due to a blocked port, missing dependencies,
    9:47:02 PM [Apache] improper privileges, a crash, or a shutdown by another method.
    9:47:02 PM [Apache] Press the Logs button to view error logs and check
    9:47:02 PM [Apache] the Windows Event Viewer for more clues
    9:47:02 PM [Apache] If you need more help, copy and post this
    9:47:02 PM [Apache] entire log window on the forums
    9:47:44 PM [main] Executing “c:\xampp\mysql”
    9:52:09 PM [Apache] Problem detected!
    9:52:09 PM [Apache] Port 80 in use by “”C:\Bitnami\WAMPST~1.30-\apache2\bin\httpd.exe” -k runservice” with PID 1744!
    9:52:09 PM [Apache] Apache WILL NOT start without the configured ports free!
    9:52:09 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    9:52:09 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    9:52:09 PM [Apache] Problem detected!
    9:52:09 PM [Apache] Port 443 in use by “”C:\Bitnami\WAMPST~1.30-\apache2\bin\httpd.exe” -k runservice” with PID 1744!
    9:52:09 PM [Apache] Apache WILL NOT start without the configured ports free!
    9:52:09 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
    9:52:09 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
    9:52:09 PM [Apache] Attempting to start Apache app…
    9:52:09 PM [Apache] Status change detected: running
    9:52:10 PM [Apache] Status change detected: stopped
    9:52:10 PM [Apache] Error: Apache shutdown unexpectedly.
    9:52:10 PM [Apache] This may be due to a blocked port, missing dependencies,
    9:52:10 PM [Apache] improper privileges, a crash, or a shutdown by another method.
    9:52:10 PM [Apache] Press the Logs button to view error logs and check
    9:52:10 PM [Apache] the Windows Event Viewer for more clues
    9:52:10 PM [Apache] If you need more help, copy and post this
    9:52:10 PM [Apache] entire log window on the forums
    nó bị vầy đây bạn

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s