LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-30-2007, 11:38 PM   #1
badengineer
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Rep: Reputation: 0
can't connect to my web server from the host


I have a web server setup on my linux machine (behind DSL router). I use Dynamis DNS so everything is cool.... I can connect to my server www.xxx.xxx from almost anywhere except the host and the intranet..

In other words, I can connect to the server using domain name from outside of my network. But I can't connect using the domain name from the host machine, where I can only connect using http://localhost.

Is this normal? What do I need to be able to connect using domain name from the host?

It's a FC6.

Thanks.
 
Old 05-31-2007, 05:05 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Yes this is normal as it relates to network loopback. You trying to request your own address and this causes your own system to become confused. It cannot resolve a request from itself to itself. Hence the requirement to use localhost. On the intranet you can use the ip address of the host. eg http://10.0.0.2
 
Old 05-31-2007, 07:47 AM   #3
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Quote:
Originally Posted by badengineer
I have a web server setup on my linux machine (behind DSL router). I use Dynamis DNS so everything is cool.... I can connect to my server www.xxx.xxx from almost anywhere except the host and the intranet..

In other words, I can connect to the server using domain name from outside of my network. But I can't connect using the domain name from the host machine, where I can only connect using http://localhost.

Is this normal? What do I need to be able to connect using domain name from the host?

It's a FC6.

Thanks.
The question is "how you configured apache". I dont know FC6 default options, but have a look ok apache configuration files to know if you have a default web server.

Also, check to see if you dont have any firewall rule blocking you access atempts!

[]´, FMC!
 
Old 05-31-2007, 08:00 AM   #4
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
IMHO, TigerOC is correct. It has to do with your DNS showing a public IP for the web site. Your machines are looking for the site, being told by DNS that it is outside your network, going out the gateway, and then trying to return and go right back. A simple solution to this is that on your machines that are inside the network (your private lan), put an entry in the hosts file showing the website and then show the private IP. I have to do this at our network for the websites we host. Or, you can set up an internal DNS machine that can point to it but it is much easier to just do the hosts entry (unless you have a lot of PC's to do). Hope this helps!
 
Old 05-31-2007, 08:32 AM   #5
badengineer
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks. It worked after I edited the hosts file.

Thanks.
 
Old 06-02-2007, 04:26 PM   #6
badengineer
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Is there a way to force internal access to the website to go out of the LAN and come back? I suppose I have to change routing table?
 
Old 06-03-2007, 02:58 PM   #7
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You can point the browser at a proxy server then your server thinks the requests are coming from the proxy.

Just curious why you want to incur the delay of delivery by hopping through the net when you only need one hop on your own network.
 
Old 06-04-2007, 08:46 AM   #8
badengineer
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
It was just easier for me to check the website. Right now I'm having some problems to access the website from outside - selinux is blocking the web access (I don't want to disable it yet). Everything appears to be good if access from the host machine, but I'd like to make sure that's what will be seen from outside.

I'm currently using proxy, but it's a bit inconvenient.
 
Old 06-04-2007, 09:03 AM   #9
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
Does the web server have a firewall that could be blocking access from the outside? Your last post was sort of confusing to me?
 
Old 06-04-2007, 06:29 PM   #10
badengineer
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
well, I have some problems with selinux. Unless I put selinux to to permissive, my website is not accesible from outside. I'm playing with selinux right now, try to make it work at Enforcing setting.

To test if it works from outside, I have to use proxy server right now. But if i can overwrite the ip routing, so i don't have to use proxy server for the testing.

I have firewall on, but port 80 is open.

hope it clarifies things a bit.
 
  


Reply



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
A web Server to host a BBS Toolbox Linux - Server 5 02-28-2007 05:48 PM
Host is not allowed to connect to this MySQL server lothario Linux - Software 1 07-08-2006 08:14 AM
Can I run a server on a non-standard port, from shell or web host account? phugoid Linux - Networking 4 03-09-2006 10:33 AM
Can not host more than 10 (IP) user on our web server MoviePoster Linux - General 4 03-08-2006 12:15 PM
Suddenly unable to connect to my web server and my ftp server. HELP! Silly22 Linux - Software 4 05-23-2004 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:31 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
Open Source Consulting | Domain Registration