LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 06-26-2006, 12: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: 65
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, 03: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, 03:52 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 4,035

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

Eric
 
Old 06-26-2006, 04: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
Blog Entries: 1

Original Poster
Rep: Reputation: 65
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, 05:29 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,021

Rep: Reputation: 125Reputation: 125
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, 05: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
Blog Entries: 1

Original Poster
Rep: Reputation: 65
THAT is my dead on config.

Thank you. Will tryit in a few.
 
Old 06-26-2006, 06: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
Blog Entries: 1

Original Poster
Rep: Reputation: 65
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, 06:17 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,021

Rep: Reputation: 125Reputation: 125
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, 06: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
Blog Entries: 1

Original Poster
Rep: Reputation: 65
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
domain names xaos5 Linux - Networking 2 06-09-2005 02:03 AM
phpBB/ apache domain names doralsoral Linux - Networking 6 05-30-2004 09:02 AM
Domain Names...? cparker15 Linux - Networking 8 08-27-2003 07:13 AM
Domain Names Timbo General 7 02-14-2003 03:10 PM
domain names cic Linux - Networking 3 06-11-2002 03:47 PM


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