Results 1 to 5 of 5

Thread: ubuntu virtual domain name

  1. #1
    Join Date
    Oct 2007
    Beans
    411

    ubuntu virtual domain name

    Hi,
    I'm writing a web app I want to run on my home server. Right now, all of the internal links have http://localhost:8080, so when I try to run it on the server none of the links work.

    I want to be able to just have http://mysite.com.

    on the server, in my etc/hosts file I added 127.0.1.1 mysite.com
    on my desktop, I added <ip for server> mysite.com

    Is that all I need to do? (it didn't work...)
    any idea how to set that up?

    Also, should I set up DNS on my server?
    thanks,
    bp
    Last edited by badperson; March 24th, 2011 at 11:01 AM.

  2. #2
    Join Date
    Jul 2008
    Location
    England
    Beans
    866

    Re: ubuntu virtual domain name

    Does your main page work when you access it from your desktop?

    You only need to set up some sort of DNS if your internal IP address changes for your home server. Some routers allow you to fix your internal IP address for specific computers.

    Paul

  3. #3
    Join Date
    Sep 2007
    Location
    Rivendell
    Beans
    487
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: ubuntu virtual domain name

    DNS is a possibility, but if you just need a quick&dirty solution for development, have a look at this:

    http://www.thelampblog.com/2010/04/2...-domain-names/
    True warriors don't follow paths - they make them.
    It's not their desire, it's their nature.

  4. #4
    Join Date
    Jan 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: ubuntu virtual domain name

    don't use absolute paths in your anchors, use relative paths (ones that start with /).

    sample of how you set up your links would be more than telling of what you are doing wrong.
    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...
    42 lines of Perl - SHI - Home Site

  5. #5
    Join Date
    Oct 2007
    Beans
    411

    Re: ubuntu virtual domain name

    the relative paths did the trick...would still like to use the domain name thing, though. will have to mess with it more.
    bp

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •