Apache2.4 will not restart after including httpd-ssl.conf - ssl

My company has just provided us SSL certificates that I had to attempt to install and configure using Apache2.4 on a Windows Server 2019.
I created a folder called "certs" within the conf folder on Apache24.
Within the certs folder, I have the following certs:
MYCOMPANY_Intermediate.cer
MYCOMPANY_Root.cer
mycompany_name_com.cer
private.cer
private.key
I have updated the httpd-ssl.conf file to include the certs, as follows:
<VirtualHost _default_:443>
DocumentRoot "D:/htdocs"
ServerName mycompany.name.com:443
ServerAdmin mycompany#email.com
ErrorLog "${SRVROOT}/logs/error-ssl.log"
TransferLog "${SRVROOT}/logs/access-ssl.log"
# SSL Engine Switch:
SSLEngine on
# Server Certificate:
SSLCertificateFile "${SRVROOT}/conf/certs/mycompany_name_com.cer"
# Server Private Key:
SSLCertificateKeyFile "${SRVROOT}/conf/certs/private.key"
# Server Certificate Chain:
SSLCertificateChainFile "${SRVROOT}/conf/certs/MYCOMPANY_Intermediate.cer"
</VirtualHost>
Back in the httpd.conf file, when I include the following:
# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf
Apache fails to restart.
Within the error log, the only thing noticeable that I am finding is maybe this:
[Sat Jan 23 10:56:32.453519 2021] [mpm_winnt:notice] [pid 8552:tid 772] AH00455: Apache/2.4.46 (Win64) mod_authnz_sspi/0.1.1 OpenSSL/1.1.1h PHP/7.4.12 configured -- resuming normal operations
[Sat Jan 23 10:56:32.453519 2021] [mpm_winnt:notice] [pid 8552:tid 772] AH00456: Apache Lounge VS16 Server built: Oct 2 2020 11:45:39
[Sat Jan 23 10:56:32.453519 2021] [core:notice] [pid 8552:tid 772] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Sat Jan 23 10:56:32.463520 2021] [mpm_winnt:notice] [pid 8552:tid 772] AH00418: Parent: Created child process 17204
[Sat Jan 23 10:56:33.684738 2021] [ssl:warn] [pid 17204:tid 808] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 23 10:56:33.729741 2021] [mpm_winnt:notice] [pid 17204:tid 808] AH00354: Child: Starting 64 worker threads.
As you will see, there are no errors, just warnings. I do not know why Apache is failing to restart, and I really need to get this to work.
Edit
In the Event View, under Windows Log under System, I see the following error:
The Apache2.4 service terminated with the following service-specific error:
Incorrect function.
I also see an event ID number 7024. I am not sure what that means.

I found my problem...
A typo.
Yup, it was a typo.
In the httpd-ssl.conf file, this part:
# Server Certificate:
SSLCertificateFile "${SRVROOT}/conf/certs/mycompany_name_com.cer"
mycompany_name_com.cer was mispelled.
thecompany_name_com.cer is the correct spelling.

Related

XAMPP / Apache Error: Apache shutdown unexpectedly [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
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:
Changing the default ports from 80 and 433 to 8080 and 443
Killing all HTTP connections with net stop http
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#mail.com
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.
I reinstalled XAMPP lots "thanks" for the help

Red Hat Apache HTTPD error

Have setup a new test server and configure HTTPD conf file as per below:
NameVirtualHost *:443
Listen 443
# URL:y1.y3t.com
<VirtualHost *:443>
ServerAdmin gis#y3t.com
ServerName y1.y3t.com
ServerAlias y1.y3t.com
ProxyTimeout 2700
Timeout 2700
SSLEngine on
# SSLProtocol -SSLv2
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /home/ssl/y3t.com.crt
SSLCertificateKeyFile /home/ssl/y3t.com.key
SSLCertificateChainFile /home/ssl/intermediate.crt
ProxyPass / http://10.0.0.2/
ProxyPassReverse / http://10.0.0.2/
ErrorLog /appl/httpd/logs/y1.y3t.com-error_log
CustomLog /appl/httpd/logs/y1.y3t.com-access_log common
</VirtualHost>
However, there seems to be some errors as per the httpd error_log.
Error Message:-
[root#sgdc-pvl-web03 ~]# tail -f /var/log/httpd/error_log
[Tue Dec 13 16:22:47 2016] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 13 16:22:47 2016] [notice] Digest: done
[Tue Dec 13 16:22:47 2016] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue Dec 13 16:22:47 2016] [notice] SSL FIPS mode disabled
[Tue Dec 13 16:22:47 2016] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations
[Tue Dec 13 16:27:21 2016] [notice] caught SIGTERM, shutting down
[Tue Dec 13 16:27:22 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 13 16:27:22 2016] [notice] SSL FIPS mode disabled
[Tue Dec 13 16:31:13 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 13 16:31:13 2016] [notice] SSL FIPS mode disabled
[Tue Dec 13 16:32:14 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 13 16:32:14 2016] [notice] SSL FIPS mode disabled
Can anyone advise on how can i resolve this? I'm still a newbie on this, really appreciate any help given!
Thanks for your help!
this lines in error_log is only "notice" and are not error massages
like the informasion about "SSL FIPS mode" that is disable (in last line)
[Tue Dec 13 16:32:14 2016] [notice] SSL FIPS mode disabled
does your web interface work correctly ?

Apache2 SSL certificate error

I am trying to add SSL certificates from Comodo Security Services on Apache/2.4.10 (Debian) OpenSSL/1.0.1k server.
For configuration:
SSLEngine on
SSLCertificateKeyFile /etc/ssl/24-06-2016/private.key
SSLCertificateFile /etc/ssl/24-06-2016/account_veedo_ru_2017_06_24.crt
SSLCertificateChainFile /etc/ssl/24-06-2016/intermediate.crt
I've got error after Apache2 restart:
[Thu Jun 30 07:39:20.895631 2016] [ssl:emerg] [pid 4614] AH02561: Failed to configure certificate account.veedo.ru:443:0, check /etc/ssl/24-06-2016/account_veedo_ru_2017_06_24.crt
[Thu Jun 30 07:39:20.895688 2016] [ssl:emerg] [pid 4614] SSL Library Error: error:140AD009:SSL routines:SSL_CTX_use_certificate_file:PEM lib
AH00016: Configuration Failed
For configuration:
SSLCertificateKeyFile /etc/ssl/24-06-2016/private.key
SSLCertificateFile /etc/ssl/24-06-2016/account_veedo_ru_2017_06_24.crt
SSLCACertificateFile /etc/ssl/24-06-2016/intermediate.crt
The error is:
[Thu Jul 07 18:22:21.423776 2016] [ssl:emerg] [pid 14180] AH02562: Failed to configure certificate account.veedo.ru:443:0 (with chain), check /etc/ssl/24-06-2016/account_veedo_ru_2017_06_24.crt
[Thu Jul 07 18:22:21.423826 2016] [ssl:emerg] [pid 14180] SSL Library Error: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib
AH00016: Configuration Failed
What is wrong? How can I check my certificates? Please help!
Seller wrote me that there was an extra line feed symbol in certificate. It is fixed now and works correctly.
there is a line at the end of crt file that should be removed , just before ---- end ...
really annoying

Xampp Apache server not responding to request

I have installed Xampp server (xampp-win32-5.6.8-0-VC11-installer) on Windows 8 64 bit os. I have deployed the HelloWorld application folder in htdocs directory and added a virtual host in httpd-vhosts.conf file like below
<VirtualHost localhost:80>
DocumentRoot C:/xampp/htdocs/
RewriteEngine On
ProxyRequests Off
ServerName localhost
<Directory C:/xampp/htdocs/Aasifeweb/app/>
Require all granted
Allow from all
</Directory>
<Location />
ProxyPass http://localhost/Aasifeweb/app/#/home
ProxyPassReverse http://localhost/Aasifeweb/app/#/home
ProxyPassReverseCookiePath / http://localhost/Aasifeweb/app/#/home
</Location>
</VirtualHost>
Apache error Log file
[Fri Aug 07 19:23:26.149126 2015] [ssl:warn] [pid 2684:tid 448] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 07 19:23:26.200160 2015] [core:warn] [pid 2684:tid 448] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Aug 07 19:23:26.268206 2015] [ssl:warn] [pid 2684:tid 448] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 07 19:23:26.298225 2015] [mpm_winnt:notice] [pid 2684:tid 448] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8 configured -- resuming normal operations
[Fri Aug 07 19:23:26.298225 2015] [mpm_winnt:notice] [pid 2684:tid 448] AH00456: Apache Lounge VC11 Server built: Jan 28 2015 16:48:40
[Fri Aug 07 19:23:26.298225 2015] [core:notice] [pid 2684:tid 448] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Aug 07 19:23:26.301227 2015] [mpm_winnt:notice] [pid 2684:tid 448] AH00418: Parent: Created child process 3576
AH00548: NameVirtualHost has no effect and will be removed in the next release C:/xampp/apache/conf/extra/httpd-vhosts.conf:20
[Fri Aug 07 19:23:26.763535 2015] [ssl:warn] [pid 3576:tid 448] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 07 19:23:26.885617 2015] [ssl:warn] [pid 3576:tid 448] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 07 19:23:26.918638 2015] [mpm_winnt:notice] [pid 3576:tid 448] AH00354: Child: Starting 150 worker threads.
[Fri Aug 07 19:23:29.637450 2015] [mpm_winnt:error] [pid 3576:tid 4852] AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
This problem occurs when i add virtual host configuration to the httpd-vhosts.conf file. When i remove the virtual host, the server seems to respond. The deployed application is written in angular-js framework
Important: The request seems to be appending the resource path again and again. But, I'm not sure why this happens?
GET /Aasifeweb/app/%23/homeAasifeweb/app/%23/homeAasifeweb/app/%23/homeAasifeweb/app/%23
When I hit http://localhost in browser, it keeps loading. There are lot of solutions in the internet, but nothing works for me.
Things I have tried to solve the problem
I have done netsh winsock reset
I have changed the port of the
apache server
I have disabled skype and antivirus
Please let me know your views
I didn't have to use ProxyPass at all. I just had to point the directory and Angularjs - ng-route takes care of page routing.
<VirtualHost localhost:80>
DocumentRoot C:/xampp/htdocs/Aasifeweb/app
</VirtualHost>

Certificate does NOT include an ID which matches the server name [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I'm using XAMPP and started Apache but I cannot access my site over HTTPS.
I get the following error;
[Wed Aug 20 08:05:33.208723 2014] [ssl:warn] [pid 3784:tid 256] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Aug 20 08:05:33.746774 2014] [ssl:warn] [pid 3784:tid 256] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Aug 20 08:05:33.825871 2014] [mpm_winnt:notice] [pid 3784:tid 256] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 configured -- resuming normal operations
[Wed Aug 20 08:05:33.825871 2014] [mpm_winnt:notice] [pid 3784:tid 256] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01
[Wed Aug 20 08:05:33.825871 2014] [core:notice] [pid 3784:tid 256] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'
[Wed Aug 20 08:05:33.830753 2014] [mpm_winnt:notice] [pid 3784:tid 256] AH00418: Parent: Created child process 4452
[Wed Aug 20 08:05:35.148052 2014] [ssl:warn] [pid 4452:tid 268] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
Below is a snippet from my httpd-ssl.conf file:
# SSL Virtual Host Context
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "C:/xampp/htdocs"
ServerName www.example.com:443
ServerAdmin admin#example.com
ErrorLog "C:/xampp/apache/logs/error.log"
TransferLog "C:/xampp/apache/logs/access.log"
</VirtualHost>
What am I doing wrong and how can I fix it?
[Wed Aug 20 08:05:33.208723 2014] [ssl:warn] [pid 3784:tid 256] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
This means there might be a server name of foo.example.com but the certificate is for bar.example.com only. In that situation, while Apache might try to serve such certificate, the browser s will not accept them when accessing https://foo.example.com, for instance.
server name used in Apache (httpd.conf) must be the same as the server name in apache (httpd-ssl.conf) e.g. in Apache (httpd.conf) ServerName localhost:8080 then in apache (httpd-ssl.conf) should be like this ServerName www.example.com:8080
Try to install newer version not latest version
Backup all databases and code
Uninstall XAMPP
Install newer version
That should be fixed.
https://sourceforge.net/projects/xampp/
In File "httpd-ssl.conf" setting :
SSLEngine on (default)
change Off to SSLEngine setting.