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
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Artysystem administratorCommented:

> 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.

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
Artysystem administratorCommented:
Location can be determined with

httpd -V
 -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).

Check for these files, you will get the cpanel template which was used for compiling your apache:-


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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.