LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-05-2004, 01:10 AM   #1
treotan
Member
 
Registered: Jun 2004
Posts: 126

Rep: Reputation: 15
virtualhost behind NAT


How to make a virtualhost work? I have one ip and two different domain (e.g. domain1.com & www.domain2.com).

How to make it run? as following is my httpd:

Listen 80

NameVirtualHost internal_ip:80
NameVirtualHost outside_ip:80

<VirtualHost internal_ip:80 outside_ip:80>
ServerName domain1.com
ServerAlias *.domain1.com
DocumentRoot /var/www/html/domain1
</VirtualHost>

<VirtualHost internal_ip:80 outside_ip:80>
ServerName www.domain2.com
ServerAlias *.domain2.com
DocumentRoot /var/www/html/domain2
</VirtualHost>



It is not work! It only make it to DocumentRoot directory!!!
 
Old 08-05-2004, 09:11 AM   #2
Erebus Bat
LQ Newbie
 
Registered: Jul 2004
Distribution: Ubuntu 10.04 (Lucid)
Posts: 25

Rep: Reputation: 15
Treotan:

Try using a * as a wildcard for your IP and Ports.

Try looking at my notebook for when I set up my virtual host, it may help you: http://www.batcavern.com/linux/httpdvhosts.html

Last edited by Erebus Bat; 08-05-2004 at 09:13 AM.
 
Old 08-05-2004, 10:14 AM   #3
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
terotan, you can run http -S to check your vhost settings.
 
  


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
Apache -VirtualHost davidhk Debian 7 08-19-2005 12:33 PM
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 05:50 AM
VirtualHost amdathlonboy Linux - Networking 2 06-22-2004 05:23 AM
setting virtualhost without IP acid_kewpie Linux - Networking 3 12-10-2002 07:45 AM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 04:07 AM

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

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration