Forum Moderators: travelin cat

Message Too Old, No Replies

apache 2 problems

Just installed apache 2 and it doesn't work

         

Track23

6:00 pm on Feb 27, 2005 (gmt 0)

10+ Year Member



Hello,
I've got a G5 running OSX 10.3.8 and I recently installed apache 2.0.52. It works fine on my machine but when I try to access the pages from another computer I can't connect. If I shut down apache 2 and start up 1.3.3 then I can view those pages.

tstaheli

12:50 am on Feb 28, 2005 (gmt 0)

10+ Year Member



You can't connect or you don't have your permissions set correctly?

Track23

1:05 am on Feb 28, 2005 (gmt 0)

10+ Year Member



when I attempt to connect, it doesn't load and I get an error "Cannot connect to host"

tstaheli

1:14 am on Feb 28, 2005 (gmt 0)

10+ Year Member



What happens when you issue this command as root? "apachectl restart"

Track23

3:50 am on Feb 28, 2005 (gmt 0)

10+ Year Member



its kind of strange. when I navigate to the directory first "cd /usr/.../apache2/bin"and then issue the command "apachectl restart" through the terminal it starts apache 1.3.3, but when I do it in one command "/usr/.../apachectl restart" it restarts apache 2. it still won't serve pages to external connections on apache 2.

BjarneDM

10:15 am on Mar 1, 2005 (gmt 0)

10+ Year Member



As to your apachectl start problems you have an incomplete understanding of how things work. When you cd to your apache2 bin directory you'll have to prefix apachectl with ./ to indicate that OS X has to look in the current directory for the command. Otherwise, you get the first apachectl Terminal finds - which in this case starts the Apple Apache 1.3.x. The reason it works when specifying the full path and executable is that this is an explicit command. You can find the generic apachectl by executing
which apachectl
. And to see where the system is looking for unix commands execute
echo $PATH ¦ tr ":" "\n"
. And as

As to not being able to access the server from external computers: do you have the Apple FireWall switched on? If so, then it's blocking the requests. The reason it's working for 1.3.x is that when you use the sharing panel to switch on 1.3.x you at the same time open the corresponding ports in the Apple FireWall.

Now, to see whether your Apache2 is actually running issue this command:

ps -auxww ¦ grep httpd
. And to start any service that uses a port below 1024 you'll either have to bee root or be an administrator and prefix the command with sudo.

Try looking at these threads too for further information:
[webmasterworld.com...]
[webmasterworld.com...]

Track23

5:20 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Thanks a lot,
I hadn't even thought about the firewall, now it works fine.