LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-26-2006, 01:25 PM   #1
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
domain names under one apache webserver


The title kinda says it all.

I have multiple domain names, all going to the same IP and apache server.

The way I had it setup, if you surfed there, the server name in the browser would change to one of the other ones (I forget exactly what it did, but it was a minor irritant.)

My question is: How do I keep these straight? I have RTFM, but I'm as confused as ever.

I'm running -current, no changes.

Any ideas?
 
Old 06-26-2006, 04:40 PM   #2
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
hrmm.
how do you have your virtualhosts defined?
 
Old 06-26-2006, 04:52 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8119Reputation: 8119Reputation: 8119Reputation: 8119Reputation: 8119Reputation: 8119Reputation: 8119Reputation: 8119Reputation: 8119Reputation: 8119Reputation: 8119
Yup, <VirtualHost></VirtualHost> is the clue indeed.
Also, do not forget to enable
NameVirtualHost *

Eric
 
Old 06-26-2006, 05:22 PM   #4
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
Thanks all..

Any easier to understand guides on apache than the dang docs? As I said, I'm cornfuzzled.
I would like to know what/where/how/options of the virtual hosts.
 
Old 06-26-2006, 06:29 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I hope this is useful...

The following setup uses 3 virtual hosts. The first one serves no purpose except to intercept requests that use an IP address instead of a domain name - it returns 403 errors for everything. I figure if people don't know my domain, they're not looking for the content, just vulnerabilities.

The other 2 entries represent domains I have visible through the servers at dyndns.com. I've stripped out the re-write rules, logging and authentication stuff just to provide the overview.

This all goes at the end of the httpd.conf file:

Code:
NameVirtualHost *:80

<VirtualHost *:80>
  ServerName default.only
  <Location />
    Order allow,deny
    Deny from all
  </Location>
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/mydomain
  ServerName www.mydomain.com
  <Directory "/var/www/mydomain">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/anotherdomain
  ServerName www.anotherdomain.com
  <Directory "/var/www/anotherdomain">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
 
Old 06-26-2006, 06:46 PM   #6
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
THAT is my dead on config.

Thank you. Will tryit in a few.
 
Old 06-26-2006, 07:01 PM   #7
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
Thank you very much.

Using your 'template' with my own mods for where everything is, it works EXACTLY as I wanted

Thanks again to all.
 
Old 06-26-2006, 07:17 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Glad to hear it It's my first good news since watching Australia vs Italy this morning in the world cup...
 
Old 06-26-2006, 07:23 PM   #9
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
Glad I'm not an Aussie, then....
 
  


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
domain names xaos5 Linux - Networking 2 06-09-2005 03:03 AM
phpBB/ apache domain names doralsoral Linux - Networking 6 05-30-2004 10:02 AM
Domain Names...? cparker15 Linux - Networking 8 08-27-2003 08:13 AM
Domain Names Timbo General 7 02-14-2003 04:10 PM
domain names cic Linux - Networking 3 06-11-2002 04:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:47 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
Open Source Consulting | Domain Registration