LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-16-2002, 08:16 AM   #1
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
Access apache virtual hosts from lan


Hi,

My virtual hosts work fine but I cannot access them via the web from my lan. I can use the serveralias apache directive to access one host. All i have to do is type MYALIAS in my browser and it goes to the right place. My question is can I add multiple aliases to the hosts file to access multiple virtual hosts? Can I add more aliases to the same loopback address?


Hosts File
127.0.0.1 MYALIAS localhost.localdomain localhost
add?
127.0.0.1 ANOTHERALIAS localhost.localdomain localhost



# host1 (i can access this default server by IP address)
<VirtualHost>
DocumentRoot /www/mydir1
ServerName stuff.mydomain.com
</VirtualHost>

# Host2 (can't access internally, but ok on www)
<VirtualHost>
DocumentRoot /www/mydir1
ServerName morestuff.mydomain.com
ServerAlias MYALIAS
</VirtualHost>

# Host2 (I can access this by alias)
<VirtualHost>
DocumentRoot /www/mydir1
ServerName morestuff.mydomain.com
ServerAlias MYALIAS
</VirtualHost>

thanks
 
Old 07-16-2002, 08:57 AM   #2
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
127.*.*.* is for your m/c. Make your new virthost point to
some of them. But setting it them to same ip will also
work.
(127.0.0.2 alias.ydomain alias)
(But why do you want to do this, since no other m/c will
see them?)
 
Old 07-16-2002, 09:20 AM   #3
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Original Poster
Rep: Reputation: 30
Sarin,

What is m/c?

All my virtual hosts are accessable outside my lan.

I cannot get to some of them internally. That's the problem.

-tom
 
  


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
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Accessing MY virtual hosts from MY Lan. TheSwine Linux - Networking 2 03-02-2004 02:41 PM
Apache Virtual Hosts quozt Linux - General 3 10-15-2003 09:51 AM
Apache Virtual Hosts quozt Linux - Networking 1 07-29-2003 05:56 PM
Apache Virtual Hosts (again) scatcat Linux - General 1 10-17-2002 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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