Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-12-2002, 12:36 PM   #1
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Rep: Reputation: 15
Talking Apache and Localhost

Does anyone know if you can set up a 'virtualhost' directive to only answer to 'localhost' queries?

IE you have a cron with a wget to http://localhost/thing.php ... is it possible to setup apache to actually make a 'server' based around 'localhost' queries?

A yes/no answer is all that is needed... and if you know of a link to docs on this particular issue, please by all means paste away!
Old 06-13-2002, 03:41 AM   #2
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
If I understand you right then you would want http://localhost/page.htm to resolve to something different then http://yoururl/page.htm.
Can't you just create two different name based virtual hosts for that?

Here they explain how to do that:
Old 06-13-2002, 11:14 AM   #3
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Original Poster
Rep: Reputation: 15
I would think so, but since the quirky way localhost exists (its a solid name, not actually a domain named being mapped outside the internet), I didn't know if apache would understand whats coming in to it.

I guess I will just fiddle around with experiments today and see.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 01:41 AM
apache http://localhost/mysite ---> http://localhost/mysite/index.php how? ilnli Linux - General 8 06-04-2005 04:23 PM
Apache only works on localhost Airwaves Linux - Networking 8 07-12-2004 03:29 AM
localhost on apache Xing Linux - Software 5 09-28-2003 04:38 AM
http://localhost apache matt3333 Linux - Software 16 05-25-2003 02:55 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:16 PM.

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