LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 08-11-2005, 10:45 PM   #1
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Apache ServerName


I have an apache server running on one of my local computers (as in, on my LAN, behind a NAT router. I have portforwarding and all configured, and it works great for access both locally and over the internet. There's only one problem. With a servername of "lancomp", going to http://webdomain.com redirects to http://lancomp/ (adding the trailing slash). Reversing things breaks it from the LAN side. What is the reccomended practice for setting ServerName in this case? Or perhaps I should set it up for vhosts and add a ServerAlias for each name?

All thoughts are welcomed, of course. Thanks for reading this.
 
Old 08-12-2005, 01:04 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
I have found in the exact same situation that leaving ServerName entirely unset helps a lot. I can access the server by the private name or IP as well as using the FQDN from the outside.


Håkan
 
Old 08-12-2005, 09:18 PM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,279

Rep: Reputation: 61
you can get around this if you have a linux router just add an entry in your /etc/hosts file:

ipaddress lancomp

If you don't have alinux router just have to do the same for hosts files in your linux and windows clients

Then when someone types http://lancomp in the browser your router will redirect them to your server.

Hope this helps
 
  


Reply


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
How to configure ServerName for Apache 2.0 in Mandrake? terrygao Linux - Networking 1 10-24-2004 03:59 AM
can't ping Apache by ServerName semesm Linux - Networking 1 05-13-2004 04:40 PM
can't ping Apache on redhat 9 by ServerName semesm Linux - General 1 05-13-2004 04:33 PM
can't ping Apache by ServerName semesm Linux - Newbie 1 05-13-2004 04:32 PM
apache servername agfaread Linux - Newbie 0 07-01-2003 01:47 AM


All times are GMT -5. The time now is 03:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration