Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-26-2006, 01:25 PM
|
#1
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
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?
|
|
|
06-26-2006, 04:40 PM
|
#2
|
Member
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796
Rep:
|
hrmm.
how do you have your virtualhosts defined?
|
|
|
06-26-2006, 04:52 PM
|
#3
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
Yup, <VirtualHost></VirtualHost> is the clue indeed.
Also, do not forget to enable
NameVirtualHost *
Eric
|
|
|
06-26-2006, 05:22 PM
|
#4
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Original Poster
Rep:
|
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.
|
|
|
06-26-2006, 06:29 PM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep:
|
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>
|
|
|
06-26-2006, 06:46 PM
|
#6
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Original Poster
Rep:
|
THAT is my dead on config.
Thank you. Will tryit in a few.
|
|
|
06-26-2006, 07:01 PM
|
#7
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Original Poster
Rep:
|
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.
|
|
|
06-26-2006, 07:17 PM
|
#8
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep:
|
Glad to hear it It's my first good news since watching Australia vs Italy this morning in the world cup...
|
|
|
06-26-2006, 07:23 PM
|
#9
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Original Poster
Rep:
|
Glad I'm not an Aussie, then....
|
|
|
All times are GMT -5. The time now is 01:47 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|