5 Replies - 2087 Views - Last Post: 23 November 2009 - 07:49 PM

#1 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 214
  • Joined: 30-June 09

Apache webserver with unregister domain name

Post icon  Posted 23 November 2009 - 10:36 AM

Dear all,
I have install an Apache webserver on my windows XP. And I tried to make it online by assign it with an unregistered domain name.
Questions:
1. I know that it is not recommended to put an unregistered domain name in a webserver, but I do this for experimental purpose. Suppose I picked a random name like www.kerifskkdll.com and register it to a free public DNS server. Will this work?

2. This is my first time to configure a webserver in my PC so please bear with me. Suppose the following is my ipconfig:
C:\Program Files\Apache Software Foundation\Apache2.2\bin>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

		Connection-specific DNS Suffix  . :
		IP Address. . . . . . . . . . . . : 192.168.1.2
		Subnet Mask . . . . . . . . . . . : 255.255.255.0
		Default Gateway . . . . . . . . . : 192.168.1.1

PPP adapter STAR:

		Connection-specific DNS Suffix  . :
		IP Address. . . . . . . . . . . . : 135.163.19.11
		Subnet Mask . . . . . . . . . . . : 255.255.255.255
		Default Gateway . . . . . . . . . : 125.163.19.183


My internet provider STAR assigns me IP address 135.163.19.11
Therefore in my Apache httpd.conf file I would do this:
Listen 8080
NameVirtualHost 135.163.19.11:8080
<VirtualHost 135.163.19.11:8080>
ServerName 135.163.19.11:8080
ServerAlias www.kerifskkdll.com
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
</VirtualHost> 


Is this configuration correct? Anything should be added from it?

3. Since I'm using home internet cable, the IP address will constantly change and I probably need a software to map the constant IP. How this will reflect the Apache configuration file? What is a good software to do this?

Best regards,
ethereal1m

Is This A Good Question/Topic? 0
  • +

Replies To: Apache webserver with unregister domain name

#2 moopet  Icon User is offline

  • binary decision maker
  • member icon

Reputation: 339
  • View blog
  • Posts: 1,185
  • Joined: 02-April 09

Re: Apache webserver with unregister domain name

Posted 23 November 2009 - 11:30 AM

I'm not 100% sure I know what you're trying to achieve, but I think you just want to have a webserver running that you can see, internally and externally.

If you forget about the external IP address, and make the virtualhost listen on 127.0.0.1 or 192.168.1.2, and add
127.0.0.1  www.mycompletelyfictitiousdomainwhatIjustinventedright.com

to your hosts file, then you can locally browse to http:// www.mycompletelyfictitiousdomainwhatIjustinventedright.com and it'll work. But there's no benefit to this over browsing to http://127.0.0.1 except that server variables will contain the hostname if you're planning on writing something celver.

However, if you want to see your website from somewhere on the interwebs, you'll just need to use your router to forward connections on port 80 to 192.168.1.2. Make sure this IP address is either fixed or reserved in the DCHP configuration on the router. Sign up for a free dynamic dns account with dyndns.org or no-ip.com or similar and follow their instructions.
Was This Post Helpful? 1
  • +
  • -

#3 no2pencil  Icon User is online

  • Dic Head
  • member icon

Reputation: 5169
  • View blog
  • Posts: 26,856
  • Joined: 10-May 07

Re: Apache webserver with unregister domain name

Posted 23 November 2009 - 04:50 PM

View Postethereal1m, on 23 Nov, 2009 - 11:36 AM, said:

Will this work?

Only if you run a program to update your ip address, or get commercial grade service from your ISP. When (not if) your ip provided by your ISP changes, your DNS will fail & your website will no longer load correctly (at all). Check no-ip (dot com?) for more information & programs.
Was This Post Helpful? 0
  • +
  • -

#4 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 214
  • Joined: 30-June 09

Re: Apache webserver with unregister domain name

Posted 23 November 2009 - 07:35 PM

View Postmoopet, on 23 Nov, 2009 - 10:30 AM, said:

However, if you want to see your website from somewhere on the interwebs, you'll just need to use your router to forward connections on port 80 to 192.168.1.2. Make sure this IP address is either fixed or reserved in the DCHP configuration on the router. Sign up for a free dynamic dns account with dyndns.org or no-ip.com or similar and follow their instructions.


Yes, I want to publish the content of my website to internet. I don't understand why you suggest to forward 192.168.1.2 instead of 135.163.19.11 to the router where 192 is the local address and 135 is the assigned address.

And also I'm not sure if I need to install a router that connects directly to my webserver. My internet provider assigns 135.163.19.11 to my account, so obviously it recognizes that address. In order the package in correctly forwarded from the webserver ethernet port, I can assign a static ARP to it. Therefore my webserver communicates directly with my internet provider router. And also I don't need to worry about DCHP configuration since it should be taken care of by my internet provider.

Am I right?

Quote

Only if you run a program to update your ip address, or get commercial grade service from your ISP.


When you say "commercial grade service" do you mean to get static IP address instead of dynamic? Can I install somekind of software that dynamically updates the webserver address configuration? Or if there no such thing exists, I can change the address manually whenever the address changes, can't I?
Was This Post Helpful? 0
  • +
  • -

#5 no2pencil  Icon User is online

  • Dic Head
  • member icon

Reputation: 5169
  • View blog
  • Posts: 26,856
  • Joined: 10-May 07

Re: Apache webserver with unregister domain name

Posted 23 November 2009 - 07:45 PM

View Postethereal1m, on 23 Nov, 2009 - 08:35 PM, said:

Yes, I want to publish the content of my website to internet. I don't understand why you suggest to forward 192.168.1.2 instead of 135.163.19.11 to the router where 192 is the local address and 135 is the assigned address.

And also I'm not sure if I need to install a router that connects directly to my webserver. My internet provider assigns 135.163.19.11 to my account, so obviously it recognizes that address. In order the package in correctly forwarded from the webserver ethernet port, I can assign a static ARP to it. Therefore my webserver communicates directly with my internet provider router. And also I don't need to worry about DCHP configuration since it should be taken care of by my internet provider.

Your rouatable ip address is 135.163.19.11 : This is the address that you can communicate to & from the rest of the world. However, this only goes to your modem (or ISP assigned device). Behind this device, you have a router. The router routes traffic from the routable address to the non-routable subnet (or your internal network).

When someone visits your website, they will hit the ip address 135.163.19.11 & send a port 80 request. What does your modem do with that request, it hands it off to the router. What does your router do with the request? If no rule is in place to forward the port 80 requests to 192.168.1.2, then the port 80 request is dropped. So you must forward any ports from the outside, routable interface to the internal, non-routable address.


View Postethereal1m, on 23 Nov, 2009 - 08:35 PM, said:

When you say "commercial grade service" do you mean to get static IP address instead of dynamic?

Yes.

View Postethereal1m, on 23 Nov, 2009 - 08:35 PM, said:

Can I install somekind of software that dynamically updates the webserver address configuration?

That's what I suggested in the previous post. Check http://no-ip.com for both the software & the setup examples.
Was This Post Helpful? 1
  • +
  • -

#6 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 214
  • Joined: 30-June 09

Re: Apache webserver with unregister domain name

Posted 23 November 2009 - 07:49 PM

View Postno2pencil, on 23 Nov, 2009 - 06:45 PM, said:

Your rouatable ip address is 135.163.19.11 : This is the address that you can communicate to & from the rest of the world. However, this only goes to your modem (or ISP assigned device). Behind this device, you have a router. The router routes traffic from the routable address to the non-routable subnet (or your internal network).

When someone visits your website, they will hit the ip address 135.163.19.11 & send a port 80 request. What does your modem do with that request, it hands it off to the router. What does your router do with the request? If no rule is in place to forward the port 80 requests to 192.168.1.2, then the port 80 request is dropped. So you must forward any ports from the outside, routable interface to the internal, non-routable address.


This is really great explanation! :P :^: I totally ignore the fact that a modem was included in my network. Thanks for reminding me in Networking 101!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1