Welcome to WebmasterWorld Guest from 54.90.204.233

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Corrupt httpd.conf

More Mac OS X Web Development woes

     
12:47 pm on Jun 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 23, 2003
posts:165
votes: 0


To cut a long story short, I have managed to ruin my httpd.conf file. No I didn't make a backup. Yes, I am an idiot. (I tried to edit the virtual hosts and did it wrong so therefore decided to copy over the file with an old backup which turned out to be completely incorrect.)There are however various backups on the system (I'm on OS X 10.3) e.g. in /etc/httpd/.

I've tried to copy over my corrupt httpd.conf files with these backups files to no avail. Apache 2.052 was working fine this morning and all I did was fiddle with httpd.conf so that must be the culprit.

My webfiles are located in the following folder /www/ and my Apache insatll is located here /Library/Apache2/

I've trying to start Apache through System Preferences pane and it simply doesn't start. Ifd I try to start it in terminal like so: /library/apache2/bin/httpd
I get this error message: no listening sockets available, shutting down
unable to open logs

Certain options are confusing me in the httpd.conf file e.g ServerRoot is set to "/usr" should it be? the pid file doens't seem to exist in the folder it point sot (or at all for that matter) "/private/var/run/httpd.pid"

Oh, and virtual hostname has been commented out by default. I'll worry about that when Apache starts again.

Any ideas?

Can I uninstall Apache2 without stinking the place out and if so how do I do that?

p.s. I've been editing the files in BBEdit, if that makes a difference.

1:17 pm on June 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 23, 2003
posts:165
votes: 0


Since my post (all of 5 minutes ago) I have made slight progress. Apache starts hooray but it isn't all good.

Base on the terminal error message and some googling I changed the Listen directive to listen to 127.0.0.1:81 and Apache started again but trying to navigate to [localhost...] tells me I've been refused connection. i changed the nameVirtualHost to 127.0.0.1:81 and my other directive to
<virtualHost localhost:81>

to no avail

so I edited NameVirtual Host out and removed the <virtual host /> as well.

and still no joy.

2:08 pm on June 29, 2005 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


So... is this the OS X Server version of apache? Or did you install the server logistics apache install [serverlogistics.com]?

If I was running the SL version, I'd just reinstall the thing. Get everything nice and clean (and working) then make separate backups and go back to screwing it up again. But that's just me. :)

Added: It takes all of, what, 5 minutes to reinstall? Less time than you've spent troubleshooting so far.

2:31 pm on June 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 23, 2003
posts:165
votes: 0


it's server logistics.

I am new to macs; so please tell me. How do I uninstall Apache in order to reinstall it?

2:34 pm on June 29, 2005 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


Just run the installer again, it should install on top of the old version. However you need to BACKUP what you do have now, especially everything in your /www/ folder.

It may write over your sites so you'll want to have copies of your sites elsewhere.

I don't have my machine that runs the software logistics version here to test how it reinstalls, but as long as you backup your sites you should be okay. :)

4:01 pm on June 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 23, 2003
posts:165
votes: 0


I reinstalled it to no avail. Then I renamed the apche folder to apache2-old and ran the installer and now it all works.

PHP isn't working yet but that will come with time and more fiddling.

4:02 pm on June 29, 2005 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


It must look for the folder and not do the install. I'm glad you sorted that out. :)
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members