LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   can't connect to my web server from the host (https://www.linuxquestions.org/questions/linux-server-73/cant-connect-to-my-web-server-from-the-host-557913/)

badengineer 05-30-2007 11:38 PM

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.

TigerOC 05-31-2007 05:05 AM

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

FMC 05-31-2007 07:47 AM

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!

ScooterB 05-31-2007 08:00 AM

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!

badengineer 05-31-2007 08:32 AM

Thanks. It worked after I edited the hosts file.

Thanks.:)

badengineer 06-02-2007 04:26 PM

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?

TigerOC 06-03-2007 02:58 PM

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.

badengineer 06-04-2007 08:46 AM

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.

ScooterB 06-04-2007 09:03 AM

Does the web server have a firewall that could be blocking access from the outside? Your last post was sort of confusing to me?

badengineer 06-04-2007 06:29 PM

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.


All times are GMT -5. The time now is 09:10 AM.