LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2007, 03:18 AM   #1
beachcomber
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
Redirect URL to localhost


Hi apologies if this question has been asked a thousand times before (But I did search the threads that the forums AI suggest before I posted)...

I have managed to install linux (SUSE - install went like a dream) and I'm hoping to use it as my main development box however I've hit one wall that I don't seem to be able to resolve.

I think what I want to be able to do is to locally resolve my clients domains on this box.

I'll try and explain better with an example.

I have a client who has an existing live web site URL "www.myclient.com"

Instead of typing a development URL of http://localhost/~myclient in my browser I want to get apache to resolve requests to www.myclient.com to go to http://localhost/~myclient instead of the current live web site.

Is what I'm trying to achieve possible?

If it is can anyone tell me how, or point me in the direction of a tut on it?

Beachcomber.
 
Old 10-22-2007, 03:28 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
would an entry to /etc/hosts pointing that name to 127.0.0.1 not suffice? you wouldn't be able to route to that hostname, but i guess that's imaterial really. you could also use a browser plugin for developers which allows you to specify arbitrary headers, i.e. in firefox you could go to http://127.0.0.1 but include a HOST header for the clients domain name which apache would then act upon. i expect a /etc/hosts is probably all you really want.
 
Old 10-22-2007, 05:03 AM   #3
beachcomber
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Sounds like the solution

Hi,

As always, what seems insurmountable is actually very simple...

I haven't tried your suggested solution yet (I will later), but it seems to make perfect sense. I will try it in a little while when I've a couple of mins. - It a typical Monday morning here and the phone hasn't stopped ringing!

I will update the thread to let you know how I get on.

Beachcomber
 
Old 10-22-2007, 08:39 AM   #4
beachcomber
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thumbs up Close message

Hi acid_kewpie.

I have now had a chance to amend my local hosts file /etc/hosts and as per your advice my clients domain now resolves to my local machine. The key thing is that now the address in the address bar says my clients URL.

The reason that I needed this to resolve locally was that my client wants google maps and that requires you register the live domain. Now that I have their domain resolving to my local machine I can incorporate the maps locally without having to try to develop the page using their live site.

Many, many thanks

Rob

Last edited by beachcomber; 10-22-2007 at 08:55 AM. Reason: Typo
 
  


Reply

Tags
apache, localhost, resolve



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
redirect url munna_dude Linux - Software 2 02-15-2007 12:18 AM
url redirect Present Linux - Networking 4 01-26-2007 09:08 AM
Apache URL redirect problem kdogksu Linux - Networking 2 03-26-2005 02:22 PM
URL Redirect (with Masking) BxBoy General 0 03-11-2003 09:44 PM
Apache Virtual URL Redirect nxny Linux - Software 0 07-19-2002 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration