Solved

How to rename domain to something other than localhost with apache on USB install?

Posted on 2008-10-27
9
1,177 Views
Last Modified: 2012-05-05
I am trying to develop a distributable USB stick with XAMPP on it in which users can view web based material, without actually connecting to the web.  Is it possible, and if so how, to change 'localhost' in Apache to something unique, like the project name or such.  For instance I'd like it to show up as <myproject.com>, even though they are viewing the domain from a USB stick.
0
Comment
Question by:Xerc
  • 5
  • 4
9 Comments
 
LVL 10

Expert Comment

by:PeturIngiEgilsson
ID: 22820198
add "myproject.com 127.0.0.1" (or was it via versa?) to /etc/hosts

0
 

Author Comment

by:Xerc
ID: 22825871
Errrrr........I'm assuming that is for a Linux environment?  I couldn't find such a directory on the XAMPP installation on a USB stick.  This will operate on a Windows system, but I need it to configure or work from the USB without user intervention.
0
 

Author Comment

by:Xerc
ID: 22826013
Wait....nvm.  I track you.  At C:\Windows\System32\drivers\etc\ I see the hosts file.  I'm unable to save or make edits, but at least I see it.  Sooooooo......basically there is no way to have a portable Apache installation show up with the domain name I want without aggressively altering the target computers hosts file?  Poop.
0
 
LVL 10

Expert Comment

by:PeturIngiEgilsson
ID: 22829385
I'm a bit confused.

You have a USB stick, you plug it into computer. Boot that computer from the usb stick,  Then allow other computers on the same network to access the web server running on that stick using www.projectname.xyz ?
If that is the case, then you need to modify either the hosts file on each computer, or if you have a DNS server add the appropriate record to it.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:Xerc
ID: 22830663
Not quite right.  I'll run XAMPP (therefore Apache) on the USB stick, but the computer will not boot from th e stick.  The OS and such is still 'whatever' computer the stick happens to be inserted into at the time.  So, I'm looking for a way to get that 'myproject.usb' domain name without having to modify the hosts file.  Maybe its not possible.
0
 
LVL 10

Accepted Solution

by:
PeturIngiEgilsson earned 500 total points
ID: 22831591
It's not possible unless you do it on the DNS server, which is not a good idea.
0
 

Author Comment

by:Xerc
ID: 22832355
Well.  Figured as much, but what happens if someone already has a server occupying 127.0.0.1 on the local machine.  Is there a way to dynamically make the IP of my stick recognizable?  I'm going to guess not.  Not a biggie as it is a rare instance, but you never know.
0
 
LVL 10

Expert Comment

by:PeturIngiEgilsson
ID: 22832441
Two application cannot run on the same port.
I'm not familiar enough with XAMPP to answer your question.

Feel free to request your points back as i've been unable to solve the original question.
0
 

Author Closing Comment

by:Xerc
ID: 31510628
Confirming what isn't possible is still a valid answer even if it doesn't solve my problem / wish.  Points awarded.  Thanks for the time and help!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Root Hints - Windows DNS 8 34
Child domain picking up very stale DNS records 5 92
SBS 2008 DC DIAG Missing AAAA record at DNS server : 5 44
Domino Website - Redirection 12 52
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now