LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 05-10-2004, 08:55 PM   #1
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
How to make Apache show different hostname?


My hostname is assigned by my ISP's DHCP server. I also own a domain that points at my IP.

Apache works.

When I go to the URL domain.foo (my domain), everything is fine. When I go to domain.foo/public, Apache changes the URL to my-dhcp-hostname/public.

How can I make Apache always identify itself (and the URL) as domain.foo? I don't think I can change my actual hostname, because my ISP's DHCP server assigns my hostname.

Thanks!

Last edited by mac_phil; 05-10-2004 at 08:59 PM.
 
Old 05-11-2004, 12:16 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
One alternative is to use the <base href=""> element in your HTML files...
 
Old 05-11-2004, 12:03 PM   #3
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Original Poster
Rep: Reputation: 30
Interesting.

Actually I'm just listing a directory at that URL, so there really isn't an HTML file.

So would I add that line to my Apache config, or is there a different answer?

Thanks for the tip, I'll keep it in mind when I look at the docs.
 
  


Reply



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
Show WAN ip, hostname, etc. lothario Linux - Networking 2 02-02-2005 11:59 AM
Can I make sqlplus use a default hostname? deanbrown3d Linux - Newbie 3 07-01-2004 03:00 PM
make php show up? Maver Linux - General 5 06-11-2004 02:42 PM
How to make change in hostname beowulf405 Linux - General 4 03-12-2004 10:24 PM
whois does not show hostname. zoltar77n Linux - Newbie 1 10-16-2003 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:03 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