Latest LQ Deal: Latest LQ Deals
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 08-11-2005, 10:45 PM   #1
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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 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
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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.

Old 08-12-2005, 09:18 PM   #3
Senior Member
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
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


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 > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:12 AM.

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
Open Source Consulting | Domain Registration