Networking Forums

Networking Forums > Computer Networking > Linux Networking > Basic Apache Web Server Question

Reply
Thread Tools Display Modes

Basic Apache Web Server Question

 
 
JMecc
Guest
Posts: n/a

 
      12-15-2006, 05:42 PM
I have a Fedora Core 4 machine with Apache (system configured per this
tutorial: http://www.howtoforge.net/perfect_setup_fedora_core_4 ). I
placed my homepage files in /var/www/html/ and now can access them from
my local network as http://192.168.0.150/index.htm and so forth.

The question is, how can I access these files from outside my network,
effectively serving the website on this machine? Can it be done while
the server is behind my router? The router is a D-Link DI-524 and I
have set the HTTP(TCP 80/80) "Virtual Server" in the router
configuration to 192.168.0.150 , thinking that requests coming to my ip
for html would be redirected to my server. BTW I got my ip address from
plugging my computer directly from the modem (skipping the router) and
then using ipconfig - is this my correct address or is that still an
abstraction from my ISP just like 192.168 addresses are local and not
*really* your ip? Should I use a switch to split the connection from
the ISP to my router and the server? Can this serving be done without
my registering a domain name?

Any comments would be appreciated. Thanks,
Jo

 
Reply With Quote
 
 
 
 
Keith Keller
Guest
Posts: n/a

 
      12-15-2006, 08:04 PM
On 2006-12-15, JMecc <(E-Mail Removed)> wrote:
> I have a Fedora Core 4 machine with Apache (system configured per this
> tutorial: http://www.howtoforge.net/perfect_setup_fedora_core_4 ). I
> placed my homepage files in /var/www/html/ and now can access them from
> my local network as http://192.168.0.150/index.htm and so forth.
>
> The question is, how can I access these files from outside my network,
> effectively serving the website on this machine? Can it be done while
> the server is behind my router? The router is a D-Link DI-524 and I
> have set the HTTP(TCP 80/80) "Virtual Server" in the router
> configuration to 192.168.0.150 , thinking that requests coming to my ip
> for html would be redirected to my server.


If they're not, then you probably misconfigured the router somehow.
This question is not really appropriate for a linux newsgroup unless
you're actually running linux on the DLink. Either that, or your
ISP blocks incoming port 80, in which case you are out of luck.

> BTW I got my ip address from
> plugging my computer directly from the modem (skipping the router) and
> then using ipconfig - is this my correct address or is that still an
> abstraction from my ISP just like 192.168 addresses are local and not
> *really* your ip?


Ideally, you should ask your ISP. But you'd better make sure that
your ISP allows you to run daemons before asking them.

--keith

--
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

 
Reply With Quote
 
Ian M Robertson
Guest
Posts: n/a

 
      12-15-2006, 08:15 PM
JMecc wrote:

> I have a Fedora Core 4 machine with Apache (system configured per this
> tutorial: http://www.howtoforge.net/perfect_setup_fedora_core_4 ). I
> placed my homepage files in /var/www/html/ and now can access them from
> my local network as http://192.168.0.150/index.htm and so forth.
>
> The question is, how can I access these files from outside my network,
> effectively serving the website on this machine? Can it be done while
> the server is behind my router? The router is a D-Link DI-524 and I
> have set the HTTP(TCP 80/80) "Virtual Server" in the router
> configuration to 192.168.0.150 , thinking that requests coming to my ip
> for html would be redirected to my server. BTW I got my ip address from
> plugging my computer directly from the modem (skipping the router) and
> then using ipconfig - is this my correct address or is that still an
> abstraction from my ISP just like 192.168 addresses are local and not
> *really* your ip? Should I use a switch to split the connection from
> the ISP to my router and the server? Can this serving be done without
> my registering a domain name?
>
> Any comments would be appreciated. Thanks,
> Jo



Is your IP from ISP static or dynamic ?

If its dynamic then you will need to subscribe to a dynamic dns service (
many are free ) to reliably access your local server from the outside ( see
dyndns.org )

On the router you need to port forward 80 to the ip of your virtual server
and whatever port you have set apachie to be on ( 80 is probably OK )

You may also wish to give the web server machine a static address on your
lan.


On the web server host set apachie to Listen to either or all of ( 0.0.0.0
any address ), 127.0.0.1, its lan ip

That's all you need

IanR
 
Reply With Quote
 
JMecc
Guest
Posts: n/a

 
      12-16-2006, 06:43 PM
It is sort-of fixed now - I registered for DynDNS and it detected my ip
as something different from what I thought - now either entering that
ip or the name I gave it on DynDNS reaches the server but only still
from my local network. I tried to access it from a friend's computer
and from the university but neither worked.

I am now trying to get info from Telus as to whether they allow you to
host a site like this.

Ian M Robertson said "On the web server host set apachie to Listen to
either or all of ( 0.0.0.0 any address ), 127.0.0.1, its lan ip" - how
do I set this property? I didn't see anything like this in
/etc/init.d/httpd.conf.

Thanks a lot for the feedback,
Jo

 
Reply With Quote
 
Ian M Robertson
Guest
Posts: n/a

 
      12-16-2006, 07:40 PM
JMecc wrote:

> It is sort-of fixed now - I registered for DynDNS and it detected my ip
> as something different from what I thought - now either entering that
> ip or the name I gave it on DynDNS reaches the server but only still
> from my local network. I tried to access it from a friend's computer
> and from the university but neither worked.


did you try to browse or ping -from the outside ? ping would let you know if
the machine is visible whatever the http config.

You have set the virtual server up on the router ??
>
> I am now trying to get info from Telus as to whether they allow you to
> host a site like this.


Better not to ask. ISPs usually don't like you running public services like
this but probably don't mind if its for a restricted audience.
>
> Ian M Robertson said "On the web server host set apachie to Listen to
> either or all of ( 0.0.0.0 any address ), 127.0.0.1, its lan ip" - how
> do I set this property? I didn't see anything like this in
> /etc/init.d/httpd.conf.
>
> Thanks a lot for the feedback,
> Jo

Look for the part of httpd.conf which contains the Listen config will be
something like
-----
# Listen: Allows you to bind Apache to specific IP addresses and/or
# Change this to Listen on specific IP addresses as shown below to
#Listen 12.34.56.78:80
Listen 80
-----

Set your ip and port there -

IanR

 
Reply With Quote
 
JMecc
Guest
Posts: n/a

 
      12-16-2006, 08:19 PM
OK I have it now - thanks for all the help. I called Telus (ISP) & yes
they block ports 80,21, 25... so I just changed the virtual server's
public ports (such that public port 5080 maps to private port 80). The
site is then accessible as before but with :5080 tacked onto the end of
it, which I then got rid of using DynDNS' WebHop service. I guess I
could do the same with port 22 for SSH but won't just to keep things
safer (since someone guessing my password now can't do too much bad).

Thanks a lot Ian & Keith,
Jo

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very basic question TJ Windows Networking 5 05-12-2008 06:06 PM
Configuring Basic Authentication on Apache Pandaeatsbamboo Linux Networking 0 05-07-2008 10:05 AM
really basic question The Reid Broadband 13 03-04-2007 09:04 AM
Apache web host name resolution question Ed Marsh Linux Networking 2 07-09-2004 08:00 PM
Proftpd + Apache: a question on ftp access configuration fil Linux Networking 0 12-18-2003 10:26 AM



1 2 3 4 5 6 7 8 9 10 11