Apache Failing to Start after Accidentally Deleting CRT, ca-bundle and .key

Unfortunately I made a big mistake today after trying to complete an easy task on my WHM server. I deleted my sites .crt, .key and ca-bundle files causing Apache to fail, and all of my sites to go down. With my technician unavailable until tomorrow, I'm stuck with a downed site and only my minimal technical knowledge to correct it, so any assistance is greatly appreciated.

Anyways here is where I'm at, I re-created my .key and .crt file using the following method: http://www.akadia.com/services/ssh_t...rtificate.html

However now when I try and start Apache I get this error:

service httpd restart
[Wed Apr 14 18:54:58 2010] [error] VirtualHost xx.x.227.xxx:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Wed Apr 14 18:54:58 2010] [warn] NameVirtualHost xx.x.227.xxx:80 has no VirtualHosts
[Wed Apr 14 18:54:58 2010] [warn] NameVirtualHost xx.x.227.xxx:80 has no VirtualHosts
[Wed Apr 14 18:54:58 2010] [warn] NameVirtualHost xx.x.227.xxx:80 has no VirtualHosts
httpd not running, trying to start

I'm really unsure what to do, any assistance would be greatly appreciated!

Also I should post the results of: service httpd status

Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/whm-server-status
mindlessactsAsked:
Who is Participating?
 
shaunakConnect With a Mentor Commented:
Hello,
Check for these files, you will get the cpanel template which was used for compiling your apache:-

 /var/cpanel/templates/apache2/main.default
 /var/cpanel/templates/apache2/main.local
 /var/cpanel/templates/apache2/vhost.default
 /var/cpanel/templates/apache2/vhost.local
 /var/cpanel/templates/apache2/ssl_vhost.default
 /var/cpanel/templates/apache2/ssl_vhost.local  

I would suggest to get whm running first and then restore the setup with the help of whm.

Check for /backup/cpbackup and there you will find backup of your sites. Use whm to restore those.

Also by using /var/cpanel/easy/apache/profile/_main.yaml you can get the apache recompiled with the help of easyapache.

If you have a L3 or lower support from datacenter, ask them to to fix it up. They have mirror disks.
0
 
NopiusCommented:
Hi.

> Anyways here is where I'm at, I re-created my .key and .crt file
Probably this is not the only you have done.

> VirtualHost xx.x.227.xxx:0

On the same IP you are mixing VirtualHost with port numner and without port number (:0 means without port number).
If you need SSL, use 443, if you need HTTP, use 80. You should have different virtual hosts for SSL and non SSL ports.

Hope this helps.

Regards,
Arty
0
 
mindlessactsAuthor Commented:
Thank you, but where do I edit the port of the VirtualHost, is this located in my httpd.conf?

If so do you know the exact directory? I couldn't seem to find it's location.

Thanks so much, Brad
0
 
NopiusCommented:
Location can be determined with

httpd -V
command,
...
 -D HTTPD_ROOT="/etc/httpd"
...
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

So, config is here: /etc/httpd/conf/httpd.conf
In the config itself there may be other includes, like: "Include conf.d/*.conf"
All these includes are located below httpd_root (and includes may have their own includes etc).


Regards,
Arty
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.