Is it possible to let Apache serve an IP address?

Is it possible to let Apache serve an IP address so the public can view my site? I'm pretty sure it can because my friend uses the same ISP as me and everything works fine for him...

I'm currently running WinXP Pro with Apache Server 2.0.48 my ISP is Rogers Cable.

If you need more info please ask and hopefully I can get an answer soon.

NanZhongAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ahoffmannCommented:
apache can either listen on all configured IPs, or on selected/configured IPs.
It's up to your operating system or WinXP to provide the IP, apache can't do that.
0
NanZhongAuthor Commented:
Yeah I understand that, I want to know if it can serve and IP address that I provide and if it can how.
0
ahoffmannCommented:
see Listen and BindAddress directives in httpd.conf
0
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

NanZhongAuthor Commented:
I found the Listen directives and changed it to: Listen 192.168.0.XXX:80
but the BindAddress directive couldn't be found.

One more question, my comp isn't hooked up directly to the internet it is hooked up to a network hub that provides the internet. Would the IP address of my comp or my hub be the one I should use? Because some tutorials have talked about something like that.
0
ahoffmannCommented:
> Would the IP address of my comp or my hub be the one I should use?
you *have* to use the address you configured.

> I found the Listen ..
that's ok

you need NAT at the firewall/router to have your server being reached from internet.
The admin of this firewall/router must configure a port-forwarding to your configured IP (if you use a virtual IP too).
0
NanZhongAuthor Commented:
I'm kinda confused by your answer... as you can see I'm much of a newb.
So what do you mean by "configured" and about my firewall, it's the Windows XP firewall and it is set to let anything on port 80 to pass. And I don't think that my network hub has any built in firewalls...
0
ahoffmannCommented:
ok, more detailled description:
 your private (RFC)-IP 192.168.0.x will not be routed by your ISP, but your ISP assigns a valid IP to you when you connect.
The device which connects to your ISP (DSL, or whatever) then is the router i mentioned above.
This router is configured for NAT, somtetimes also called masquerading.

If this is all done so far, as I assume 'cause you're still able to serv in the internet, then you don't need to do more configuration.
Just tell everyone who wants to reach your server, the IP you get from your ISP.

Is this what you need?
0
NanZhongAuthor Commented:
So basically, under the Listen directive I use the 192.168.0.x but when the public wants to view my site, they should use the IP that I get from my ISP?

If that is correct, it sill doesn't work because when I type 244.192.169.144 into the internet explorer's address bar it says it cannot be found.
0
littlegCommented:
you have to log into your router and set it to forward a port to your servers ip the 192.168.0.xxx.

your apache serve needs to be configured to listen on that port .
and the servername should be set the the external ip.(is can be seen when you log into your router as well)

that should get the information needed throught to your server.

lates,
littlegiant
0
NanZhongAuthor Commented:
Is there a difference between a router and a hub, because I'm not too sure if I can log in to my hub... My hub is a NETGEAR 4 Port Ethernet hub Model 104TP
0
littlegCommented:
how does you internet propogate to your network?
does it plug into your "hub",
do you have a computer with 2 network cards running ics?
or do you only have 1 computer?

LG
0
NanZhongAuthor Commented:
Sorry about not responding, I have 2 computers the one I'm not using have the Cable modem hooked up to it, it is them hooked up to the hub and the hub links my compt to the internet.
0
ahoffmannCommented:
> Is there a difference between a router and a hub
yes, for shure

> .. it says cannot be found.
this sound more like a routing and/or DNS problem

All in all, this question goes far bejond its initial question about apache configuration, 'cause you seem to have more nedd to get used to networking rather tah apache.

As you said, that aou're a newbe, could you please tell us which with wich terms you're familar?
  NIC, IP, hub, router, DNS, ISP, DHCP, NAT, masquerading, port-forwarding, subnet, netmask, etc. etc.
0
samriCommented:
hi NanZhong,

* just to add to what you had been thru with ahoffmann.

Perhaps it would be best to leave apache running as it is -- default, since it is configure to listen on all available interface port 80.

so far, what I can understand is that ;

- two machine, machineA and machineB, both are connected to a HUB.
- you are using machineA, and machineB has a connection to Cable Modem.
- both machineA and machineB has NIC which is configure to be in 192.168.x network (let machineA to have 192.168.1.1 and machineB to be 192.168.1.2)
- machine will have additional IP address, which is given by the ISP (in this case Rogers Cable).
- you can access Apache on machineB, by http://192.168.1.2/
- you need to have apache on machineB to be accessible from Internet.

If the assumption are correct;  Find out what is the other IP address on machineB (which is assigned by Rogers Cable -- hint: it's not 192.168.x) Try to get somebody on the Internet to try to do http://that-ip-address/


give it a shot.
0
NanZhongAuthor Commented:
To ahoffmann, I understand basically all the terms you listed as I got a brief description on networking from a friend.
To samri, I did exactly what you said already but It doesn't seem to work. The IP Address that Rogers gives me is 244.192.169.144. I'm pretty sure that it doesn't work because I've had friends try it. Give it try to confirm and any other suggestions are welcome.

If things really don't work, I'll get a professional in and I'll split the points among all who participated.

Thanks in advance and please give me more help. ;P
0
ahoffmannCommented:
As said before: this sound more like a routing and/or masquerading problem than apache.
Also: 244.192.169.144 is a invalid IP in internet, this look s more like a private IP of your ISP.
Could you please check with your ISP.
0
NanZhongAuthor Commented:
I'm sorry it was a typo, there should ony be one 4. So it should be: 24.192.169.144
0
samriCommented:
NanZhong/All,

if you were to be on the machine where Apache is running; could you try to browse to the following  (and feedback any that OK/failed).

http://localhost/
http://127.0.0.1/
http://192.168.1.2/  (or whatever your internal IP address is?)
http://24.192.169.144/ (or whatever Rogers assign it)

* I started to agree with ahoffmann too... but it;s worh a try.
0
ahoffmannCommented:
.. and to complete samri's list, try last 2 from your other (windows?) client
0
NanZhongAuthor Commented:
Ok, Thanks all! Out of samri's list, the first two work fine, it directs me to the index page, the Internal IP gives me a cannot find server error and for the last one, the status bar in IE says done with a picture of the earth and a magifying glass on it, but there is no page shown. I still need access to my other computer for it is currently being used... I'll post the result as soon as possible.
0
NanZhongAuthor Commented:
I just tried them again on the computer running Apache. Now when I type in the IP given to me by rogers it sometimes gives me a "cannot find server" error, and sometimes the error I describe in the last post.
0
NanZhongAuthor Commented:
I just tried them again on the computer running Apache. Now when I type in the IP given to me by rogers it sometimes gives me a "cannot find server" error, and sometimes the error I describe in the last post.
0
samriCommented:
hi NanZhong,

when tested on the machine running apache:
The first two IP would be fine since it is only loopback interface.

192.168.1.2 (or whatever your internal IP) still failed -- did confused me.

Did your web browser is configure to use proxy?  If yes, disable it.
Is the machine (apache machine) is running any firewall software?  make sure that it is configured properly?  or maybe disable it for a while, and test.

try to do a "telnet 192.168.1.2 80" when you got a blank screen, type in anything, and hit enter twice.

Check your default gateway.

Do a "netstat -rn", and check the line that begins with "0.0.0.0" (or since you already posted the IP here - might as well post the output of netstat -rn here.  Reason is - if your machine is configure to use Roger IP as the default gateway -- chance are the packet just get "lost".

try those first.
0
samriCommented:
sorry.. can both machine talk to each other in the first place?  Try to ping machineA from machineB, and then ping machineB from machineA.

machineA ping machineB ==> result
machineB ping machineA ==> result

0
NanZhongAuthor Commented:
Thanks for your help, first of all, I'm not using proxy. Second of all, telnet 192.168.0.89 80 did not work. ComputerA, the one running the server can ping 24.192.168.144. ComputerB cannot ping my computer at 192.168.0.89. It times out.

The following info is what I got from the netstat -rn:
Route Table
=====================
Interface List
0x1.....................................MSMS TCP Loopback interface
0x2...00 b0 d0 99 21 5e........3Com Integrated Fast Ethernet Controller <3c905c-TX Compatible> -Packet Scheduler Miniport
========================
===========================
Active Routes:
Network Destination            Netmask               Gateway                  Interface         Metric
0.0.0.0                               0.0.0.0             192.168.0.1                192.168.0.89            30
127.0.0.0                        255.0.0.0             127.0.0.1                         127.0.0.1            1
192.168.0.0                     255.255.255.0      192.168.0.89              192.168.0.89            30
192.168.0.89                   255.255.255.255   127.0.0.1                    127.0.0.1                30
192.168.0.255               255.255.255.255     192.168.0.89                192.168.0.89           30
224.0.0.0                         224.0.0.0             192.168.0.89                192.168.0.89        30
255.255.255.255           255.255.255.255      192.168.0.89                192.168.0.89          1
Default Gateway:             192.168.0.89
=================================
Persistent Routes: None
0
ahoffmannCommented:
routing and/or firewall problem as we assumed
You forst need to fix your network problems, then we can go back to apache.

please post from all participating hosts:
   netstat -rn
   ifconfig -a  # Linux
   ipconfig -all # Windoze

disable all firewalls on all hosts, then try ping from both ends to each other.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.