• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to host website on linux server from static IP

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

I have application and I have linux system. I have one static IP which is actually a domain name for my website.
Now I want to configure linux system such that when user types my domain name in his/her browser, he/she should be able to access my web application which is actually running on linux system.
In short mapping of static ip to linux system.

thanks in advance. waiting for reply.
 
Saloon Keeper
Posts: 28323
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're got things a little backwards there.

The actual network configuration for a TCP/IP-based system (which is what most of them are these days) is done solely via IP addresses. Usually you'll have at least 2 of them defined for each machine, but the localhost address (127.0.0.1) isn't visible outside of the machine itself.

To translate a domain name (such as www.coderanch.com) to the IP address that a client needs to know in order to send requests to your server, you need some sort of lookup facility. There are a number of different ones, but the one that pretty much rules the Internet is DNS (Domain Name Services). This is a "master telephone book" that handles the mapping of a name to an address. Copies of it are distributed all over the Internet.

To get your machine's name/IP address in that "phone book", you need to register it with an accredited Domain Name Registrar. There are a lot of them, including Verisign, register.com GoDaddy, various government agencies (depending on what country you live in, A lot of the hosting service companies will also handle registration. The registration is done for an incremental number of years, after which it expires and becomes fair game for whoever else wants to grab the name (so it's a good idea to renew registration before it expires).

There are several qualifications in addition to this. You cannot just pick an IP address for general Internet use. You need to get one (or more) assigned to you from an upstream provider. For home systems, this is often a dynamic address, which is another story, but if you are have a business account, you can often get a dedicated fixed address.

To use this address, you have to set up Linux networking (ask about it in our Linux/Unix forum), you have to open the port(s) you need in the router and host machine firewalls, and you should be aware that DNS does NOT include port numbers, only IP addresses, so if you have Tomcat's default ports set up, you'll need to either have to A) have user's include the Tomcat potrt number in their UTRLs, B) put a port translation or proxy service ahead of Tomcat or C) reconfigure Tomcat to run on ports 80 and 443 (not recommended, since this requires Tomcat to be root).
 
Prashant Chindhade
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey thanks for your reply.

I got a new router and set a rule in it. if request is came from client about particular domain that router will redirect it to linux server.

thanks
Prashant
 
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic