LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Apache forwarding (https://www.linuxquestions.org/questions/slackware-14/apache-forwarding-644047/)

The_Beast 05-22-2008 10:38 AM

Apache forwarding
 
Hi, I'm trying to forward apache so that other computers can access my directory either from the lan or the internet, I have a router which manages both the LAN and the aDSL connection, i've configured it so apache will be forwarded, but I still can't access it from any other PC, can someone point out any other steps that must be taken?

Hangdog42 05-22-2008 12:24 PM

I'm not entirely sure what you mean by "forward apache". Do you want others to be able to see the web pages you're hosting on your Apache server? If that is the case, then you need to set up your router to forward port 80 to the IP address of your Apache machine. If you're trying to do something else, please provide more details and we'll try to figure it out.

jimkalb 05-22-2008 12:45 PM

It's a little obscure just what you've done and even what you want to do. Can you connect to the Apache server from localhost? What address are you pointing your other machines to? Is it the same problem both from the LAN and the Internet?

The_Beast 05-22-2008 01:09 PM

I'm trying to access web pages from the other computers, on my computer it works fine, and I also set up my router to forward port 80 to the IP address of my PC, but still no luck accessing web pages from the LAN, I haven't tried internet yet.

zux 05-23-2008 12:15 AM

are you trying to access apache from the lan pointing to the outside ip?
I had this problem and didn't find a solution to it. a workaround is to have youre own dns server, so from lan the address bla.com resolves to 192.168... but from the outside it shows your real IP.
you can probably access it from the internet, but not from lan.
as much as i know it's a routing problem and can't be fixed. maybe somone can give a wokraround here?

rtspitz 05-23-2008 01:03 AM

on zyxel routers there's an option called "nat loopback". maybe you can find something like that for your box as well.

jimkalb 05-23-2008 02:28 AM

Can you communicate with your computer in other ways from other computers on the LAN (ping it, telnet to it, ftp to it)?

Hangdog42 05-23-2008 07:33 AM

One other thing to keep in mind is that not all routers handle the external IP address and/or domain name properly when accessing from a LAN computer. I've got two routers, one is a Motorola and the other is a Linksys. If I have the Linksys facing the Internet and go to http://mydomain.com from a computer on the LAN, I get to my web server the way I expect. However, if I have the Motorola facing the internet and do the same thing, I end up getting the Motorola's web page, despite the fact that someone from outside of my LAN gets directed to my web page. If I use the LAN IP address of the web server, it works just fine on both routers.

The_Beast 05-24-2008 04:20 AM

I've tried accessing it both from the lan and from the internet. In the first case I entered 192.168.1.66 which is my computers and I got a timeout error, also i tested from the internet by using the external IP we get from the ISP but nothing, i'm not sure whether or not it's something in my configuration or the router, does inetd and httpd.conf got to do anything with this?I've put ALL:ALL:ALLOW in the later.
I haven't tried telnet but with samba I could see it on the other computers but couldn't access it,not even a password prompt appeared...

Hangdog42 05-24-2008 07:02 AM

Quote:

In the first case I entered 192.168.1.66 which is my computers and I got a timeout error,
That suggests a problem on the server end. From the server, can you get a web page displayed by going to http://localhost ? If not, that suggests a pretty fundamental problem with Apache, like its not running. If you can, then there may be some problem like a firewall that is interfering. Have you added a firewall to the web server?
Quote:

does inetd and httpd.conf got to do anything with this?
Unless you've done something, inetd has nothing to do with this, but httpd.conf certainly does.

Quote:

I've put ALL:ALL:ALLOW in the later.
Um, are we talking about httpd.conf here or hosts.allow/hosts.deny. That doesn't look like an httpd.conf directive to me.

The_Beast 05-24-2008 07:10 AM

Quote:

That suggests a problem on the server end. From the server, can you get a web page displayed by going to http://localhost ? If not, that suggests a pretty fundamental problem with Apache, like its not running. If you can, then there may be some problem like a firewall that is interfering. Have you added a firewall to the web server?
localhost works ok, i'll try to find if something is blocking the connections,but i didn't set up no firewall...

And yeah I meant to say hosts.allow.


All times are GMT -5. The time now is 11:42 AM.