LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-08-2005, 05:47 PM   #1
Athas
LQ Newbie
 
Registered: Jan 2005
Distribution: fedora
Posts: 10

Rep: Reputation: 0
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.




Also I can't post urls so I've removed :/ / from the post in the appropiate places
 
Old 01-08-2005, 06:03 PM   #2
brandnewbie
LQ Newbie
 
Registered: Jan 2004
Location: Virginia
Distribution: Fedora Core 2
Posts: 27

Rep: Reputation: 15
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
 
Old 01-08-2005, 06:41 PM   #3
Athas
LQ Newbie
 
Registered: Jan 2005
Distribution: fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Talking

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]

Last edited by Athas; 01-09-2005 at 10:04 AM.
 
Old 01-09-2005, 07:51 AM   #4
Athas
LQ Newbie
 
Registered: Jan 2005
Distribution: fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Is there any way to automatically run the start command on system startup?

Last edited by Athas; 01-09-2005 at 10:07 AM.
 
Old 01-09-2005, 12:31 PM   #5
brandnewbie
LQ Newbie
 
Registered: Jan 2004
Location: Virginia
Distribution: Fedora Core 2
Posts: 27

Rep: Reputation: 15
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.
 
Old 01-09-2005, 02:29 PM   #6
Athas
LQ Newbie
 
Registered: Jan 2005
Distribution: fedora
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 01-09-2005, 02:40 PM   #7
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
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.
 
Old 01-10-2005, 04:47 PM   #8
Athas
LQ Newbie
 
Registered: Jan 2005
Distribution: fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Just for future reference for me the solution was

chkconfig httpd on
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache -> connection refused error dimlight Linux - Networking 6 08-11-2010 02:56 PM
Connection Refused Using Apache G24 Linux - Networking 14 09-24-2005 12:31 PM
Apache connection refused tarnishedXhalo Red Hat 2 05-19-2004 01:51 AM
apache/mozilla Connection Refused Ju Deddo Koinu Linux - Networking 8 05-02-2003 04:46 PM
apache connection refused ariana Linux - Newbie 2 03-01-2003 12:26 AM


All times are GMT -5. The time now is 01:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration