Author |
Message |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Mon Sep 25, 2006 3:30 pm Post maybe stupid Post subject: Apache VHost config |
 |
|
|
|
This is what I want to do, kind of:
Apache runs on 123.123.123.123 (port 80) with hostname toolonghostname.abc.isp.com.
I want http://123.123.123.123/ to open /var/www/default/, and
I want http://toolonghostname.abc.isp.com/ to open, also, /var/www/default/.
Now say I have a dns record somewhere which I want to use, like forums.dns.com.
I'd like http://forums.dns.com/ to open /var/www/forums.
So I want a VirtualHost setup like this:
http://123.123.123.123/ -> /var/www/default/
http://toolonghostname.abc.isp.com/ -> /var/www/default/
http://forums.dns.com/ -> /var/www/forums |
I'm pretty sure this works like this on this (MGB's) server too.
http://server2a.woolnet.net/ AND http://64.91.230.181/ -> phpSysInfo
https://forums.minegoboom.com/ -> phpBB2
http://www.minegoboom.com/ -> Some weird page.
All of this, on one and the same server.
So, MGB, what's your secret? I really have no clue after trying everything.
Or, whoever can help me fixing this VHost config... |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Mon Sep 25, 2006 5:31 pm Post maybe stupid Post subject: |
 |
|
|
|
A simple google search of vhosts will tell you a bunch.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName 207.210.96.187
DocumentRoot /var/www/phpsysinfo
<Directory /var/www/phpsysinfo>
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName minegoboom.com
ServerAlias www.minegoboom.com
DocumentRoot /home/mgb/public_html
<Directory /home/mgb/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.forums.minegoboom.com
Redirect / http://forums.minegoboom.com
</VirtualHost>
<VirtualHost *:80>
ServerName forums.minegoboom.com
DocumentRoot /home/mgb/public_html/forums
<Directory /home/mgb/public_html/forums>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost> |
Just an outline of all the good meat of the virtual hosts. Each of my subdomains are actually in their own seperate file and enabled/disabled very quickly. Pretty much how Debian's Apache2 package is installed.
Note that minegoboom.com is actually on the server2a.woolnet.net server while the forums are on mineplowers.com server, but the above configurations should outline exactly what you need. |
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Mon Sep 25, 2006 5:44 pm Post maybe stupid Post subject: |
 |
|
|
|
I see. It was just in the order it seems. Thanks, I spent like 5 hours on trying to get this fixed...
I know it sounds stupid because it's supposed to be very simple, but heh, maybe I just missed this version.
Thanks. I'm trying to get some "blackboards"-like system up for my school (Moodle).
And, well, maybe forums.
I hate some things about Debian (which I just ran into) now. But heh, I can finally do what I wanted to do now. |
|
Back to top |
|
 |
Doc Flabby Server Help Squatter

Joined: Feb 26 2006 Posts: 636 Offline
|
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Mon Sep 25, 2006 6:32 pm Post maybe stupid Post subject: |
 |
|
|
|
So what? I know lighttpd is nice, but I'm not going to use something because it's 'easier' to configure. |
|
Back to top |
|
 |
D1st0rt Miss Directed Wannabe

Age:37 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Tue Sep 26, 2006 1:15 am Post maybe stupid Post subject: |
 |
|
|
|
We use Moodle (CS Department only) and Blackboard here, though there is a push to move off of BB since it's proprietary and apparently you can't just "get all of your documents that you've put on it" according to my CS prof. _________________
 |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Tue Sep 26, 2006 7:21 am Post maybe stupid Post subject: |
 |
|
|
|
Blackboard does stink, we used it at my alma matter. It's funny being able to say that.  _________________ Performance is often the art of cheating carefully. - James Gosling |
|
Back to top |
|
 |
Doc Flabby Server Help Squatter

Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Tue Sep 26, 2006 7:23 am Post maybe stupid Post subject: |
 |
|
|
|
Solo Ace wrote: | So what? I know lighttpd is nice, but I'm not going to use something because it's 'easier' to configure. |
im lazy
easy=more time to do fun stuff less time spent configuring server
lighttpd has a much smaller memory footprint and also pwns apache on perfomance (appently) This is the first time i have used it instead of apache i tried it and was surprised it took about 10 mins to set up all my sites to run off my server with php enabled.
Apache might be more suitible for what you are doing (I only need static and php files to be servered up).... but it does make some stuff that should be very simple stupidly complex. |
|
Back to top |
|
 |
|