LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-31-2004, 03:50 PM   #1
gauntalus
Member
 
Registered: May 2004
Location: Hillsdale, MI
Distribution: gentoo 2004.3
Posts: 135

Rep: Reputation: 15
Setting up apache behind a router


I set up apache on my linux box, and when i try running httpd i get an error:
Code:
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Obviously something isn't right, but i'm a linux and I haven't a clue whats going on. help!
 
Old 05-31-2004, 04:21 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
It doesn't really matter - the server should start. To avoid the error
1) Add or edit the ServerName directive in httpd.conf and set it to your dns name or if you don't have one - just the name of the machine - ie "myserver".
2) Add the name you used above such as "www.yourhost.com" or "myserver" to the loopback address in httpd.conf - ie:
127.0.0.1 localhost localhost.localdomain myserver
or
127.0.0.1 localhost localhost.localdomain www.yourhost.com
 
Old 05-31-2004, 04:59 PM   #3
gauntalus
Member
 
Registered: May 2004
Location: Hillsdale, MI
Distribution: gentoo 2004.3
Posts: 135

Original Poster
Rep: Reputation: 15
Ok I added the ServerName directive and set it to "www.clanasr.com", but now I'm getting another error entirely.
Code:
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down.
I'm assuming this is because I didn't understand part 2) fully. All I know is my router's ip, the domain name that i bought, and the individual ip's of the machines behind my router. Thanks for the help thus far
 
Old 05-31-2004, 05:03 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
Quote:
Originally posted by gauntalus
I'm assuming this is because I didn't understand part 2) fully.
What does your /etc/hosts file look like?

That error is just occuring becaues the server is already running. Just restart the service rather than starting it.
 
Old 05-31-2004, 06:05 PM   #5
gauntalus
Member
 
Registered: May 2004
Location: Hillsdale, MI
Distribution: gentoo 2004.3
Posts: 135

Original Poster
Rep: Reputation: 15
ok i restarted it and didn't get any errors, all my /etc/hosts file contains is:
Code:
127.0.0.1                          localhost
how do i even test if i can connect to my server now? That ip can't be correct, sounds too generic.
 
Old 05-31-2004, 06:17 PM   #6
esher2292
Member
 
Registered: May 2004
Location: Maryland,USA
Distribution: Red Hat 9.0, Knoppix 3.4
Posts: 94

Rep: Reputation: 15
just so that you know, You will need to turn on port forwarding so that when someone tries to access <someipthatbelongs2u> that it will get directed to <someinternalnetworkip> Most routers either have a utility in the main router control or on their web config (if they have one!!)


Esher2292
 
Old 05-31-2004, 06:21 PM   #7
gauntalus
Member
 
Registered: May 2004
Location: Hillsdale, MI
Distribution: gentoo 2004.3
Posts: 135

Original Poster
Rep: Reputation: 15
i looked through my router web config and i don't see anything that says port forwarding...

That 127.0.0.1 ipaddress is really confusing me though, its neither my routers ip, or my linux box's ip adress, i have no idea what it is...
 
Old 05-31-2004, 06:31 PM   #8
esher2292
Member
 
Registered: May 2004
Location: Maryland,USA
Distribution: Red Hat 9.0, Knoppix 3.4
Posts: 94

Rep: Reputation: 15
That address is the "loopback" address. Wherever you are, that address will be the computer that you are working at. It's the same thing as localhost

Darn!

One thing is, you can't give someone your internal network ip to go to unless they are on your network. Otherwise they will go to their network! For instance mine is 192.168.2.4 internally but my internet ip is 69.138.169.91 That's the gateway computer's ip address.

Go to http://cherripeaches.msspro.com/desktop.PNG(make sure it has the uppercase png --That's what my opening screen for my router's web config looks like (with some quick name changes to protect the innocent!). I would click on Advanced Settings!

Maybe it would be in your router config util on your host/gateway computer? (the computer that is connected to your router)---Yes I do access this site with a windows computer and that's where my gateway is and that's what my router was ment for.

esher2292

I hope that I could help.
Good Luck!

And yes I too, am still a (newbie!)
 
Old 05-31-2004, 06:33 PM   #9
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
gauntalus

127.0.0.1 is fine it's your loopback interface where Apache listens by default, don.t
worry about that you can change it later

For now if Apache has started with no errors open your web browser and enter

http://127.0.0.1:80

You should get the default Apache web page

Pete
 
Old 05-31-2004, 06:44 PM   #10
gauntalus
Member
 
Registered: May 2004
Location: Hillsdale, MI
Distribution: gentoo 2004.3
Posts: 135

Original Poster
Rep: Reputation: 15
Hey, i tried browsing to that address and it returned a "This page could not be displayed" page, which is good right? because at least its not saying it couldn't find the page...
 
Old 05-31-2004, 06:51 PM   #11
gauntalus
Member
 
Registered: May 2004
Location: Hillsdale, MI
Distribution: gentoo 2004.3
Posts: 135

Original Poster
Rep: Reputation: 15
and esher, that link isn't working
 
Old 05-31-2004, 06:58 PM   #12
gauntalus
Member
 
Registered: May 2004
Location: Hillsdale, MI
Distribution: gentoo 2004.3
Posts: 135

Original Poster
Rep: Reputation: 15
haha, sorry for making a million posts, but i was trying to connect to "127.0.0.1:80" from my windows machine, not my linux machine, thats why it couldn't find the page, when i connected from the linux machine it found the apache page! yipee! so now i want to test it and get it running from outside.

I connected to it from my windows machine using the internal ip. I'm going to look around my router to see if i can find port forwarding, would they call it anything else by some chance?

If it IS going by some other name that port forwarding are there some basic settings i should look for that would help me identify it? There's a page called "Routing table" would that be it?

Last edited by gauntalus; 05-31-2004 at 07:02 PM.
 
Old 05-31-2004, 07:02 PM   #13
esher2292
Member
 
Registered: May 2004
Location: Maryland,USA
Distribution: Red Hat 9.0, Knoppix 3.4
Posts: 94

Rep: Reputation: 15
Not that I know of. I have to go but I'll look Tuesday!
 
  


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
Setting up router c00l Linux - Networking 1 02-05-2005 07:15 PM
router setting baremacho Linux - Networking 5 10-25-2004 09:35 AM
Setting up a router. iammike General 1 10-09-2004 03:09 PM
router setting?? chyan Linux - Networking 3 05-19-2004 08:59 PM
problems setting up apache and vsftp server behind a router that serves as a server xone Linux - Security 1 04-08-2004 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:06 AM.

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