Search code examples
apachehttpxampp

XAMPP / Apache Error: Apache shutdown unexpectedly


I am trying to get my website up and I am having some problems when starting my XAMPP Apache server

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

I tried the solutions from here with no success

What I tried is:

  1. Changing the default ports from 80 and 433 to 8080 and 443
  2. Killing all HTTP connections with net stop http
  3. Reversing all my changes (because I have been trying to install an ssl security certificate from here)

I have had no success with adding the security certificate and now Apache doesn't even start

I know this is a pretty common question, and I have read lots of the answers of that question and tried them with no success.

Here are all my modifications to my httpd.conf file:

Listen 8080
ServerName localhost:8080

NameVirtualHost *:80

<VirtualHost *:80>
        ServerName example.com
        RedirectMatch 301 ^/$ /Website/Main.html
</VirtualHost>

# Redirects
Redirect /Discord /Website/Discord.html
Redirect /discord /Website/Discord.html
Redirect /Server "https://discord.gg/"
Redirect /server "https://discord.gg/"
Redirect /Bot /Website/Bot.html
Redirect /bot /Website/Bot.html
Redirect /SlashBot /Website/Bot.html
Redirect /slashbot /Website/Bot.html
Redirect /YouTube "https://www.youtube.com/channel/blablabla"
Redirect /youtube "https://www.youtube.com/channel/blablabla"
Redirect /YT "https://www.youtube.com/channel/blablabal"
Redirect /yt "https://www.youtube.com/channel/blablabla"
Redirect /Pong /Website/Games/Pong.html
Redirect /pong /Website/Games/Pong.html
Redirect /Snake /Website/Games/Snake.html
Redirect /snake /Website/Games/Snake.html

# ssl
ServerAdmin  [email protected]
DocumentRoot "C:/xampp/htdocs"
ServerName    www.example.com
ErrorLog "logs/error.log"
SSLEngine                on
SSLCertificateFile       "C:/xampp/apache/conf/ssl/certificate.crt"
SSLCertificateKeyFile    "C:/xampp/apache/conf/ssl/private.key"
SSLCertificateChainFile  "C:/xampp/apache/conf/ssl/ca_bundl

I have checked the logs but there aren't any new logs:

[Wed Jul 28 22:13:42.963151 2021] [core:notice] [pid 6012:tid 640] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Jul 28 22:13:42.967141 2021] [mpm_winnt:notice] [pid 6012:tid 640] AH00418: Parent: Created child process 35132
AH00548: NameVirtualHost has no effect and will be removed in the next release C:/xampp/apache/conf/httpd.conf:571
[Wed Jul 28 22:13:43.541903 2021] [ssl:warn] [pid 35132:tid 580] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jul 28 22:13:43.543897 2021] [ssl:warn] [pid 35132:tid 580] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jul 28 22:13:43.543897 2021] [ssl:warn] [pid 35132:tid 580] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jul 28 22:13:43.621131 2021] [ssl:warn] [pid 35132:tid 580] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jul 28 22:13:43.622127 2021] [ssl:warn] [pid 35132:tid 580] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jul 28 22:13:43.624121 2021] [ssl:warn] [pid 35132:tid 580] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jul 28 22:13:43.679960 2021] [mpm_winnt:notice] [pid 35132:tid 580] AH00354: Child: Starting 150 worker threads.
[Wed Jul 28 22:15:04.471339 2021] [autoindex:error] [pid 35132:tid 1848] [client 81.104.41.225:51644] AH01276: Cannot serve directory C:/xampp/htdocs/Website/: No matching DirectoryIndex (index.php,index.pl,index.cgi,index.asp,index.shtml,index.html,index.htm,default.php,default.pl,default.cgi,default.asp,default.shtml,default.html,default.htm,home.php,home.pl,home.cgi,home.asp,home.shtml,home.html,home.htm) found, and server-generated directory index forbidden by Options directive
[Wed Jul 28 22:45:40.316622 2021] [mpm_winnt:notice] [pid 6012:tid 640] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Wed Jul 28 22:45:42.336092 2021] [mpm_winnt:notice] [pid 35132:tid 580] AH00364: Child: All worker threads have exited.
[Wed Jul 28 22:45:44.523409 2021] [mpm_winnt:notice] [pid 6012:tid 640] AH00430: Parent: Child process 35132 exited successfully.

The logs stopped working when Apache stopped working.

I am sorry that there is little information.


Solution

  • I reinstalled XAMPP lots "thanks" for the help