InfiniteMac OSx86  


Reply
 
Thread tools Display modes
  #1  
Old 02-05-2009, 06:42 AM
cmdshft's Avatar
cmdshft cmdshft is offline
Panther
 
Join Date: Dec 2008
Location: Hackensack, NJ
Posts: 240
Apache2 (WebSharing) Failed To Connect

All of a sudden, my Apache 2 cannot be connected to. It is enabled in system preferences, and I've made no changes other than the necessary ones (enable PHP and change access port).

I thought the problem was after installing Darwin Streaming Server, so I uninstalled everything according to a guide I followed, but even now it's still not working.

I checked /etc/hostconfig, and it says WEBSERVER=-NO-, which is what it's supposed to be after having a friend test it on his system.

Any way to fix this or reinstall the websharing?

I mounted the DVD I used to install, and opened it up with Pacifist. I dug down to the apache2 part and installed that again. Rebooted, no joy.

This sucks, because I used my apache all the time for things. Everything else works though, FTP, SSH, everything.

Mac OS X Leopard 10.5.8 (9L30) | Chameleon 2.0 RC3 | Intel Pentium 4 3Ghz 800Mhz FSB HyperThread 1MB L2 cache SSE3 1MB L2 cache works, cosmetic display of 512KB L2 cache | Asus P4V8X-MX VIA Chipset, VIA-VT8237 Southbridge | AC97 VIA8237 | Dual 1GB 333Mhz DDR SDRAM | nVidia PNY GeForce 7600GS 512MB 8x AGP DVI/TV-Out/VGA [NVinject 0.2.1; QE/CI/QuartzGL/Rotation] | Darwin Kernel Version 9.7.0: Sun Jun 14 20:48:28 IST 2009; Voodoo 2.0 Intel alpha3 :xnu-1228.12.14/BUILD/obj/RELEASE_I386 i386

Last edited by cmdshft; 02-05-2009 at 06:59 AM.
Reply With Quote
  #2  
Old 02-05-2009, 07:40 AM
throttlemeister throttlemeister is offline
Jaguar
 
Join Date: Jan 2009
Location: Netherlands
Posts: 56
Is it actually running? (ps -ef|grep apache)

If so, is it listening to the port you expect? (netstat -a|grep http for default port 80)

What are the logs saying (typically located in /var/log/Apache/)? Any errors?
Reply With Quote
  #3  
Old 02-05-2009, 08:01 AM
cmdshft's Avatar
cmdshft cmdshft is offline
Panther
 
Join Date: Dec 2008
Location: Hackensack, NJ
Posts: 240
Code:
[harataiki@Shadow-of-Intent ~]# ps -ef | grep apache
  501   531   517   0   0:00.00 ttys000    0:00.00 grep apache
[harataiki@Shadow-of-Intent ~]# netstat -a | grep 80
tcp4       0      0  192.168.1.112.49180    kc-in-f125.googl.jabbe ESTABLISHED
 56b1880 stream      0      0  6831cf0        0        0        0 /tmp/icssuis501
 5527908 stream      0      0  622d480        0        0        0 /tmp/launch-J5bXBX/Listeners
 5527880 stream      0      0        0        0        0        0
 4fcc880 stream      0      0        0  4fcc990        0        0
 4fcc990 stream      0      0        0  4fcc880        0        0
 5710880 dgram       0      0        0  5710908  5710908        0
 5710908 dgram       0      0        0  5710880  5710880        0
 56cf660 dgram       0      0        0  4fccdd0        0  56cf880
 56cf880 dgram       0      0        0  4fccdd0        0  5527990
Code:
2/5/09 1:53:47 AM com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds 
2/5/09 1:53:47 AM com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds 
2/5/09 1:53:57 AM org.apache.httpd[662] (2)No such file or directory: httpd: could not open error log file /private/var/log/apache2/error_log. 
2/5/09 1:53:57 AM org.apache.httpd[662] Unable to open logs 
2/5/09 1:53:57 AM com.apple.launchd[1] (org.apache.httpd[662]) Exited with exit code: 1
Here is my httpd.conf file (in a text file): Download

Mac OS X Leopard 10.5.8 (9L30) | Chameleon 2.0 RC3 | Intel Pentium 4 3Ghz 800Mhz FSB HyperThread 1MB L2 cache SSE3 1MB L2 cache works, cosmetic display of 512KB L2 cache | Asus P4V8X-MX VIA Chipset, VIA-VT8237 Southbridge | AC97 VIA8237 | Dual 1GB 333Mhz DDR SDRAM | nVidia PNY GeForce 7600GS 512MB 8x AGP DVI/TV-Out/VGA [NVinject 0.2.1; QE/CI/QuartzGL/Rotation] | Darwin Kernel Version 9.7.0: Sun Jun 14 20:48:28 IST 2009; Voodoo 2.0 Intel alpha3 :xnu-1228.12.14/BUILD/obj/RELEASE_I386 i386

Last edited by cmdshft; 02-05-2009 at 08:52 AM.
Reply With Quote
  #4  
Old 02-05-2009, 08:41 AM
throttlemeister throttlemeister is offline
Jaguar
 
Join Date: Jan 2009
Location: Netherlands
Posts: 56
Your Apache is not running, so it is not surprising you cannot connect.

According to your logs, there is a problem with your logfiles and/or log directory.

Check if your log directory /private/var/log/apache2 excists, and if there is a error_log and access_log.

If there are, probably the permissions are incorrect. Most likely, the directory and/or logfiles are owned by root, and the Apache server is starting under user www. If the directory ownership is not www (ls -la to check), then do a "chown -R www:www /private/var/log/apache2" and try to start apache again.

HTH

Last edited by throttlemeister; 02-05-2009 at 08:44 AM.
Reply With Quote
  #5  
Old 02-05-2009, 08:48 AM
cmdshft's Avatar
cmdshft cmdshft is offline
Panther
 
Join Date: Dec 2008
Location: Hackensack, NJ
Posts: 240
I don't see the dir:

Code:
[harataiki@Shadow-of-Intent ~]# ls  /private/var/log/
alf.log			install.log.1.bz2	system.log.0.bz2
asl			monthly.out		system.log.1.bz2
cups			secure.log		system.log.2.bz2
daily.out		secure.log.0.bz2	system.log.3.bz2
fsck_hfs.log		secure.log.1		system.log.4.bz2
ftp.log			secure.log.2.bz2	system.log.5.bz2
hdiejectd.log		secure.log.3.bz2	weekly.out
install.log		secure.log.4.bz2	windowserver.log
install.log.0.bz2	system.log		windowserver_last.log
[harataiki@Shadow-of-Intent ~]# ls  /private/var/log/apache2
ls: /private/var/log/apache2: No such file or directory
What should I do now? Do I just create the directory and make those two files then set the proper perms?

Mac OS X Leopard 10.5.8 (9L30) | Chameleon 2.0 RC3 | Intel Pentium 4 3Ghz 800Mhz FSB HyperThread 1MB L2 cache SSE3 1MB L2 cache works, cosmetic display of 512KB L2 cache | Asus P4V8X-MX VIA Chipset, VIA-VT8237 Southbridge | AC97 VIA8237 | Dual 1GB 333Mhz DDR SDRAM | nVidia PNY GeForce 7600GS 512MB 8x AGP DVI/TV-Out/VGA [NVinject 0.2.1; QE/CI/QuartzGL/Rotation] | Darwin Kernel Version 9.7.0: Sun Jun 14 20:48:28 IST 2009; Voodoo 2.0 Intel alpha3 :xnu-1228.12.14/BUILD/obj/RELEASE_I386 i386

Last edited by cmdshft; 02-05-2009 at 08:52 AM.
Reply With Quote
  #6  
Old 02-05-2009, 09:04 AM
throttlemeister throttlemeister is offline
Jaguar
 
Join Date: Jan 2009
Location: Netherlands
Posts: 56
Just do a mkdir /private/var/log/apache2 and chown -R www:www /private/var/log/apache2 and you should be set; Apache will create its logfiles when it starts up.
Reply With Quote
  #7  
Old 02-05-2009, 09:27 AM
cmdshft's Avatar
cmdshft cmdshft is offline
Panther
 
Join Date: Dec 2008
Location: Hackensack, NJ
Posts: 240
Thank you, that got it working again.

Any reason it got borked, though? I don't mess with the logs so I don't know why how they were messed with.

Mac OS X Leopard 10.5.8 (9L30) | Chameleon 2.0 RC3 | Intel Pentium 4 3Ghz 800Mhz FSB HyperThread 1MB L2 cache SSE3 1MB L2 cache works, cosmetic display of 512KB L2 cache | Asus P4V8X-MX VIA Chipset, VIA-VT8237 Southbridge | AC97 VIA8237 | Dual 1GB 333Mhz DDR SDRAM | nVidia PNY GeForce 7600GS 512MB 8x AGP DVI/TV-Out/VGA [NVinject 0.2.1; QE/CI/QuartzGL/Rotation] | Darwin Kernel Version 9.7.0: Sun Jun 14 20:48:28 IST 2009; Voodoo 2.0 Intel alpha3 :xnu-1228.12.14/BUILD/obj/RELEASE_I386 i386
Reply With Quote
  #8  
Old 02-05-2009, 09:31 AM
throttlemeister throttlemeister is offline
Jaguar
 
Join Date: Jan 2009
Location: Netherlands
Posts: 56
I have no idea. Computers are weird sometimes. Maybe you had a crash at some point, and the disk check upon next boot removed it.

Glad to have been of help. As a former unix admin, this stuff is a lot easier for me than getting my WiFi running under OSX.



💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.

Reply With Quote
Reply