Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Apache VHost config

 
Post new topic   Reply to topic Printable version
 View previous topic  Linux User Stereotypes Post :: Post How to close connections from command ...  View next topic  
Author Message
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Mon Sep 25, 2006 3:30 pm   Post maybe stupid    Post subject: Apache VHost config Reply to topic Reply with quote

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:

Code: Show/Hide
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
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Mon Sep 25, 2006 5:31 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

A simple google search of vhosts will tell you a bunch.
Code: Show/Hide
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
View users profile Send private message Add User to Ignore List Send email
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Mon Sep 25, 2006 5:44 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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. icon_smile.gif 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
View users profile Send private message Add User to Ignore List
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Mon Sep 25, 2006 5:58 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

lol i use lighttpd its easier than apache tongue.gif
_________________
Rediscover online gaming. Get Subspace | STF The future...prehaps
Back to top
View users profile Send private message Add User to Ignore List
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Mon Sep 25, 2006 6:32 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

So what? I know lighttpd is nice, but I'm not going to use something because it's 'easier' to configure.
Back to top
View users profile Send private message Add User to Ignore List
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Tue Sep 26, 2006 1:15 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Tue Sep 26, 2006 7:21 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Blackboard does stink, we used it at my alma matter. It's funny being able to say that. icon_smile.gif
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Tue Sep 26, 2006 7:23 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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 biggrin.gif

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
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 468 page(s) served in previous 5 minutes.

phpBB Created this page in 0.943440 seconds : 32 queries executed (81.4%): GZIP compression disabled