You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by jg...@cox.net on 2008/09/30 01:18:35 UTC

[users@httpd] Cannot connect to apache from outside machines

Ok done all the research I can, time for some collaboration.

New Server apache 2.5

apache running default configuration xampp/htdocs/index.html

http://localhost and http://ipaddress works great.

outside machines cannot connect to http://ipaddress

main gateway and routers have been forwarded from port 80 and port 443 as apache suggests, to the machines ip address. no machines outside the network can connect. Firewalls are temporarily off.

is there anything in the httpd file or apache that needs to be changed in order to display a webpage via the web?

Jay

Re: [users@httpd] Cannot connect to apache from outside machines

Posted by Brian Mearns <me...@gmail.com>.
Okay, I'm not sure who's question I'm answering any more, but I'll try
to explain:

/Standard/ usage of port 80 is for standard (unencrypted) http, where
as 443 is typically used for secure http (https://...). If you tell
you web browser to go to an address without explicitly specifying a
port, it will assume 80 for http and 443 for https.

That said, your apache server can listen on any available port.
Additionally, apache only manages a port with secure http if you've
set it up to do so (or the default is set up to do so, which could be
with xampp, though I'd be a little surprised). So if you don't have
https set up in apache, and you connect to port 443, it's just regular
http.

Regardless of whether it is for secure http or not, you need to have
any port that you want apache listening to explicitly given in a
Listen directive, like the 'Listen 80' shown below. As far as I know,
you need a separate Listen directive for each port. Furthermore, if
you have multiple network interfaces on your system (i.e., multiple IP
addresses), you can explicitly tell it which interface/ip-address to
listen on for each Listen directive, like 'Listen: 192.168.0.1:80'.
Without an IP address, it will listen to the specified port on all
available interfaces.

So whatever ports you want to be able to access your site via need to
be setup with a Listen directive, AND need to be forwarded to the
server-machine through any routers and firewalls between you and your
intended audience (i.e., the Internet).

The canonical unsecured (non-https) setup would be 'Listen 80' to
listen to port 80 on all available network interfaces, and to forward
incoming port 80 to port 80 (i.e., straight through) on the server
machine from all routers/firewalls.

For debugging, first see if you can connect to your site from the
server machine with http://localhost, or if you used some port besides
80, do http://localhost:<port> (there's a colon between localhost and
the port, if you can't tell). If you're able to connect, then your
apache is most likely set up.

Next, if you want to be able to connect to your machine from elsewhere
on the Internet, you'll need to use your LAN's public IP. Again, you
can get this by going to whatismyipaddress.com from your server
machine. If you're behind a router or firewall, then the address you
get from ipconfig or ifconfig is not the public address and won't work
outside your LAN.

A final note, many ISPs block port 80 for residential clients. If
you're able to connect locally, but not remotely, try /adding/ a new
Listen directive, say 'Listen 8080' and forward the new port as well,
then try connecting remotely with http://localhost:8080. If you're
able to do that, then it probably means port 80 is blocked. There's
really no work around for this: you'll have to either upgrade your ISP
services, get a new ISP that doesn't block, or just plan to always
have people specify the port number in the address. If you have to
work on a non-standard port, 8080 is a common alternate HTTP port, so
it's probably a safe bet. Using non-standard ports like 81 or 89 will
increase the likelihood that other people won't be able to connect:
many office and university networks limit the ports their users can
connect to, figuring that they only have legitimate business
connecting to a handful of standard ports like web and email.

-Brian

On Tue, Sep 30, 2008 at 11:24 AM,  <jg...@cox.net> wrote:
> Should I change following below for my ip to be reached? The port forwarding
> instructions on apaches website says to forward port 443(in router) to my ip
> and all should be fine. Someone mentioned to edit this httpd statement
> below. If that is true then would I have it listen on port 443 as apache
> says or have it listen on my ip?
>
> # Change this to Listen on specific IP addresses as shown below to
> # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
> #
> #Listen 12.34.56.78:80
> Listen 80
>
>
>
> ----- Original Message ----- From: "Brian Mearns" <me...@gmail.com>
> To: <us...@httpd.apache.org>
> Sent: Tuesday, September 30, 2008 4:28 AM
> Subject: Re: [users@httpd] Cannot connect to apache from outside machines
>
>
>> Not sure what the default xampp setup is, but look for the Listen
>> directive to verify which ports apache is actually listening on, and
>> make sure those are forwarded.
>>
>> Also, I'm not sure how much you know about networks (so pardon me if
>> you consider this suggestion offensive): are you connecting to your
>> router's public IP address, or your system's local address? If you got
>> the ip address from something like ipconfig, then it's the local
>> address. If it's something like 192.168.x.x, it's a local address. To
>> get the public address, you can go to a site like
>> whatismyipaddress.com.
>>
>> Best of luck
>> -Brian
>>
>> On Mon, Sep 29, 2008 at 10:05 PM, Nilesh Govindrajan <li...@itech7.com>
>> wrote:
>>>
>>> check the logs
>>>
>>> On Tue, Sep 30, 2008 at 4:48 AM, <jg...@cox.net> wrote:
>>>>
>>>> Ok done all the research I can, time for some collaboration.
>>>>
>>>> New Server apache 2.5
>>>>
>>>> apache running default configuration xampp/htdocs/index.html
>>>>
>>>> http://localhost and http://ipaddress works great.
>>>>
>>>> outside machines cannot connect to http://ipaddress
>>>>
>>>> main gateway and routers have been forwarded from port 80 and port 443
>>>> as
>>>> apache suggests, to the machines ip address. no machines outside the
>>>> network
>>>> can connect. Firewalls are temporarily off.
>>>>
>>>> is there anything in the httpd file or apache that needs to be changed
>>>> in
>>>> order to display a webpage via the web?
>>>>
>>>> Jay
>>>
>>>
>>> --
>>> Nilesh Govindrajan (nilesh@itech7.com)
>>>
>>> iTech7 Site and Server Administrator
>>>
>>> www.itech7.com
>>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Cannot connect to apache from outside machines

Posted by jg...@cox.net.
Should I change following below for my ip to be reached? The port forwarding 
instructions on apaches website says to forward port 443(in router) to my ip 
and all should be fine. Someone mentioned to edit this httpd statement 
below. If that is true then would I have it listen on port 443 as apache 
says or have it listen on my ip?

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80



----- Original Message ----- 
From: "Brian Mearns" <me...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Tuesday, September 30, 2008 4:28 AM
Subject: Re: [users@httpd] Cannot connect to apache from outside machines


> Not sure what the default xampp setup is, but look for the Listen
> directive to verify which ports apache is actually listening on, and
> make sure those are forwarded.
>
> Also, I'm not sure how much you know about networks (so pardon me if
> you consider this suggestion offensive): are you connecting to your
> router's public IP address, or your system's local address? If you got
> the ip address from something like ipconfig, then it's the local
> address. If it's something like 192.168.x.x, it's a local address. To
> get the public address, you can go to a site like
> whatismyipaddress.com.
>
> Best of luck
> -Brian
>
> On Mon, Sep 29, 2008 at 10:05 PM, Nilesh Govindrajan <li...@itech7.com> 
> wrote:
>> check the logs
>>
>> On Tue, Sep 30, 2008 at 4:48 AM, <jg...@cox.net> wrote:
>>>
>>> Ok done all the research I can, time for some collaboration.
>>>
>>> New Server apache 2.5
>>>
>>> apache running default configuration xampp/htdocs/index.html
>>>
>>> http://localhost and http://ipaddress works great.
>>>
>>> outside machines cannot connect to http://ipaddress
>>>
>>> main gateway and routers have been forwarded from port 80 and port 443 
>>> as
>>> apache suggests, to the machines ip address. no machines outside the 
>>> network
>>> can connect. Firewalls are temporarily off.
>>>
>>> is there anything in the httpd file or apache that needs to be changed 
>>> in
>>> order to display a webpage via the web?
>>>
>>> Jay
>>
>>
>> --
>> Nilesh Govindrajan (nilesh@itech7.com)
>>
>> iTech7 Site and Server Administrator
>>
>> www.itech7.com
>>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Cannot connect to apache from outside machines

Posted by Nilesh Govindrajan <li...@itech7.com>.
On Tuesday 30 September 2008 04:58:31 pm Brian Mearns wrote:
> Not sure what the default xampp setup is, but look for the Listen
> directive to verify which ports apache is actually listening on, and
> make sure those are forwarded.
>
> Also, I'm not sure how much you know about networks (so pardon me if
> you consider this suggestion offensive): are you connecting to your
> router's public IP address, or your system's local address? If you got
> the ip address from something like ipconfig, then it's the local
> address. If it's something like 192.168.x.x, it's a local address. To
> get the public address, you can go to a site like
> whatismyipaddress.com.
>
> Best of luck
> -Brian
>
> On Mon, Sep 29, 2008 at 10:05 PM, Nilesh Govindrajan <li...@itech7.com> 
wrote:
> > check the logs
> >
> > On Tue, Sep 30, 2008 at 4:48 AM, <jg...@cox.net> wrote:
> >> Ok done all the research I can, time for some collaboration.
> >>
> >> New Server apache 2.5
> >>
> >> apache running default configuration xampp/htdocs/index.html
> >>
> >> http://localhost and http://ipaddress works great.
> >>
> >> outside machines cannot connect to http://ipaddress
> >>
> >> main gateway and routers have been forwarded from port 80 and port 443
> >> as apache suggests, to the machines ip address. no machines outside the
> >> network can connect. Firewalls are temporarily off.
> >>
> >> is there anything in the httpd file or apache that needs to be changed
> >> in order to display a webpage via the web?
> >>
> >> Jay
> >
> > --
> > Nilesh Govindrajan (nilesh@itech7.com)
> >
> > iTech7 Site and Server Administrator
> >
> > www.itech7.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

No I don't consider your suggestion offensive as I am not a network engineer! 
I am just a student running my website on my home PC with apache, php, mysql.
I didn't configure my box for public address. The router has a public static 
ip address. Internally my box's address is 10.0.0.2 and that of router is 
10.0.0.1

Re: [users@httpd] Cannot connect to apache from outside machines

Posted by jg...@cox.net.
listens on 80 then port 443. Yes I am using public ip address to connect via 
browser. and port forwarding is forwarding to the local ip 192.168.x.x

----- Original Message ----- 
From: "Brian Mearns" <me...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Tuesday, September 30, 2008 4:28 AM
Subject: Re: [users@httpd] Cannot connect to apache from outside machines


> Not sure what the default xampp setup is, but look for the Listen
> directive to verify which ports apache is actually listening on, and
> make sure those are forwarded.
>
> Also, I'm not sure how much you know about networks (so pardon me if
> you consider this suggestion offensive): are you connecting to your
> router's public IP address, or your system's local address? If you got
> the ip address from something like ipconfig, then it's the local
> address. If it's something like 192.168.x.x, it's a local address. To
> get the public address, you can go to a site like
> whatismyipaddress.com.
>
> Best of luck
> -Brian
>
> On Mon, Sep 29, 2008 at 10:05 PM, Nilesh Govindrajan <li...@itech7.com> 
> wrote:
>> check the logs
>>
>> On Tue, Sep 30, 2008 at 4:48 AM, <jg...@cox.net> wrote:
>>>
>>> Ok done all the research I can, time for some collaboration.
>>>
>>> New Server apache 2.5
>>>
>>> apache running default configuration xampp/htdocs/index.html
>>>
>>> http://localhost and http://ipaddress works great.
>>>
>>> outside machines cannot connect to http://ipaddress
>>>
>>> main gateway and routers have been forwarded from port 80 and port 443 
>>> as
>>> apache suggests, to the machines ip address. no machines outside the 
>>> network
>>> can connect. Firewalls are temporarily off.
>>>
>>> is there anything in the httpd file or apache that needs to be changed 
>>> in
>>> order to display a webpage via the web?
>>>
>>> Jay
>>
>>
>> --
>> Nilesh Govindrajan (nilesh@itech7.com)
>>
>> iTech7 Site and Server Administrator
>>
>> www.itech7.com
>>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Cannot connect to apache from outside machines

Posted by Brian Mearns <me...@gmail.com>.
Not sure what the default xampp setup is, but look for the Listen
directive to verify which ports apache is actually listening on, and
make sure those are forwarded.

Also, I'm not sure how much you know about networks (so pardon me if
you consider this suggestion offensive): are you connecting to your
router's public IP address, or your system's local address? If you got
the ip address from something like ipconfig, then it's the local
address. If it's something like 192.168.x.x, it's a local address. To
get the public address, you can go to a site like
whatismyipaddress.com.

Best of luck
-Brian

On Mon, Sep 29, 2008 at 10:05 PM, Nilesh Govindrajan <li...@itech7.com> wrote:
> check the logs
>
> On Tue, Sep 30, 2008 at 4:48 AM, <jg...@cox.net> wrote:
>>
>> Ok done all the research I can, time for some collaboration.
>>
>> New Server apache 2.5
>>
>> apache running default configuration xampp/htdocs/index.html
>>
>> http://localhost and http://ipaddress works great.
>>
>> outside machines cannot connect to http://ipaddress
>>
>> main gateway and routers have been forwarded from port 80 and port 443 as
>> apache suggests, to the machines ip address. no machines outside the network
>> can connect. Firewalls are temporarily off.
>>
>> is there anything in the httpd file or apache that needs to be changed in
>> order to display a webpage via the web?
>>
>> Jay
>
>
> --
> Nilesh Govindrajan (nilesh@itech7.com)
>
> iTech7 Site and Server Administrator
>
> www.itech7.com
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Cannot connect to apache from outside machines

Posted by Nilesh Govindrajan <li...@itech7.com>.
check the logs

On Tue, Sep 30, 2008 at 4:48 AM, <jg...@cox.net> wrote:

>  Ok done all the research I can, time for some collaboration.
>
> New Server apache 2.5
>
> apache running default configuration xampp/htdocs/index.html
>
> http://localhost and http://ipaddress works great.
>
> outside machines cannot connect to http://ipaddress
>
> main gateway and routers have been forwarded from port 80 and port 443 as
> apache suggests, to the machines ip address. no machines outside the network
> can connect. Firewalls are temporarily off.
>
> is there anything in the httpd file or apache that needs to be changed in
> order to display a webpage via the web?
>
> Jay
>



-- 
Nilesh Govindrajan (nilesh@itech7.com)

iTech7 Site and Server Administrator

www.itech7.com