LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache Configuration Problem (The connection was refused) (https://www.linuxquestions.org/questions/linux-newbie-8/apache-configuration-problem-the-connection-was-refused-275512/)

Athas 01-08-2005 04:47 PM

Apache Configuration Problem (The connection was refused)
 
Hi I know next to nothing about Linux. However I'm attempting to learn. Would anyone mind trying to help with my problem.

I want to set up php mysql and apache on a reciently installed Fedora FC 3 machine.

I've followed the first few steps in http fedora.redhat.com/docs/selinux-apache-fc3/
and definatly have installed the following modules
  • httpd-manual
  • httpd-suexec
  • php

However when I type http localhost/ into this browser (firefox) I simply recieve the message
"The connection was refused when attempting to contact localhost."

I also have a problem adding the module php-mysql this says that php is an unlocatable package required by php-pear and php-ldap.

Please help I've only used apache on a Windows machine before.


:scratch: :newbie: :scratch: :cry:

Also I can't post urls so I've removed :/ / from the post in the appropiate places

brandnewbie 01-08-2005 05:03 PM

Are you sure that apache is running. As root, run the command

httpd -k start

and see what happens when you try to load localhost

Athas 01-08-2005 05:41 PM

bash: httpd: command not found

[edit] sorry I wasn't logged in as root I used su to switch but it doesn't act the same
Thanks very much that worked great.



[/edit]

Athas 01-09-2005 06:51 AM

Is there any way to automatically run the start command on system startup?

brandnewbie 01-09-2005 11:31 AM

When I installed apache onto my Fedora box, apache was automatically set to run at system boot. Try this--shut down and restart fedora, and then try to open localhost in your web browser (http://localhost). If you reach the Fedora test page, then apache is starting up at boot as expected.

Athas 01-09-2005 01:29 PM

Quote:

Originally posted by brandnewbie
When I installed apache onto my Fedora box, apache was automatically set to run at system boot. Try this--shut down and restart fedora, and then try to open localhost in your web browser (http://localhost). If you reach the Fedora test page, then apache is starting up at boot as expected.
Thanks but I'm afraid that isn't the solution I shutdown every night and have to restart into windows commonly so thats not the solution. Its annoying me as its one of the primary reasions that I wanted to give linux a shot.

bmarx 01-09-2005 01:40 PM

I am actually having a similar problem, on a slackware 10.0 machine. If I start apache as root, and start firefox as a normal user, i have no problem going to localhost.

The problem arises when i make a seperate user called "server" that is supposed to have more privileges than a normal user to be able to start apache, read/write the files it needs to and whatnot. I have only given read/write priviliges to it to the apache log files.

When i start apache logged in as "server", i get an error in the apache log file that says something along the lines of "could not bind to port 80", and apache fails to start.

Since i can start apache as root, what i would like to know is which files i need to have access to in order to start apache. If the answer is "read the documentation", could you please be a little more specific? :)

Thanks in advance.

Athas 01-10-2005 03:47 PM

Just for future reference for me the solution was

chkconfig httpd on


All times are GMT -5. The time now is 07:41 PM.