Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Apr 2003
    Posts
    17

    Default how to configure apache to display a website when someone enters an ip address

    hi,

    i have a cpanel server with 10-12 ips. i want to configure apache such that whenever somebody starts internet explorer and enters any of the ip addresses of my box, my main website is displayed.

    how do i configure apache to do that ?

    thanks, any help will be appreciated.
    Triatma E-Services
    IT Solutions and Web Hosting for your Business


  2. #2
    Member
    Join Date
    May 2004
    Posts
    17

    Default

    Hey triatma,

    You need to look into the <VirtualHost> directive in apache, and how to use it... With it you can specify which site to load based on IP address, and also host multiple web-sites from a single IP.

    These examples should point you in the right direction...

    http://httpd.apache.org/docs/vhosts/examples.html

    Hope that helps.
    Give me ambiguity, or give me something else!

  3. #3
    Member
    Join Date
    Apr 2003
    Posts
    17

    Default

    still confused and don't know which example applies to me.

    i have 12 ips, and i want all requests to any ip directly to go only to one website.

    also which is the file that should be edited ? that url does not mention that.
    Triatma E-Services
    IT Solutions and Web Hosting for your Business


  4. #4
    Member
    Join Date
    May 2004
    Posts
    17

    Default

    Thats a bit harder... It depnds on how cpanel sets it's VirtualHost directives (I'm yet to use it, hanging out here to see what the comunity is like).

    I think the examples that apply to you are "IP-based vhosts"... look at, and carefully read each example then try to grasp what kind of setup they are describing, and if it is similar to what you want... they cover most every possible situation, so if you just keep your nose buried in the HTML, you'll come away with the answer you're looking for.

    As for what file to edit, that also depends on your system... On my web-server (slackware) this would be done in:

    /etc/apache/httpd.conf

    If you can't find it, try using 'locate httpd.conf' or 'find / -name httpd.conf' from a command prompt.
    Though, I suspect that cpanel uses a database to store it's configurations, and next time you use cpanel to make a change, any changes not done through cpanel could be overwritten..... can any cpanel employees confirm this?
    Give me ambiguity, or give me something else!

  5. #5
    Member
    Join Date
    Apr 2003
    Posts
    17

    Default

    yes, i found the httpd.conf file thanks, but it still beats me how i can have only one website come up, based on any ip entered in the browser window.

    topic justifies some research on my part. thanks so much.
    Triatma E-Services
    IT Solutions and Web Hosting for your Business


Similar Threads & Tags
Similar threads

  1. Display website address when setting up new account
    By daverad in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 09-22-2007, 08:12 PM
  2. how do you configure the file manager to display.....?
    By ebengal in forum New User Questions
    Replies: 1
    Last Post: 10-10-2006, 06:42 PM
  3. My website will not display
    By TYRANT in forum New User Questions
    Replies: 2
    Last Post: 10-07-2004, 03:45 PM
  4. All sites display ... There is no website configured at this address
    By asuservice in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-10-2004, 10:44 AM
  5. After apache upgrade : There is no website configured at this address
    By isputra in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-13-2003, 08:03 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube