LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-03-2003, 07:29 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Rep: Reputation: 32
sub domain Q's


hi people

was the diff between virtual host and sub domain..?

I've been looking on how to set up a sub domain

EG: http://www.forums.my_site.com/

I've looked though here and i cant seem to find one..

http://www.redhat.com/apps/search/results.html

any one help me out on how its done.

I've created my dir for the site under

/var/www/html/forums

now what

tommytomato
 
Old 12-03-2003, 07:49 AM   #2
fuelinjection
Member
 
Registered: Nov 2003
Location: County Durham, England
Distribution: Fedora
Posts: 238

Rep: Reputation: 30
For one, I dont think sub domains are able to start with www. If your domain is 'www.mydomain.com' then your sub domains would be 'http://subdomain.mydomain.com'.

In my opinion, a virtual host is simply a section of space allocated to hold a website. For example.

In your home machine, your main website (www.youdomain.com) would maybe point to the root of your server (/usr/pkg/apache/htdocs/).
If someone was to request the subdomain (http://subdomain.yourdomain.com) it may point to a subfolder within your route, i.e, /usr/pkg/apache/htdocs/subdomain/

I hope this helps.

Please feel free to correct me if I'm wrong. but this is what I think they are from my experience in webdesign.

As for setting up a sub domain, I dont have a clue, I've only been using linux for a week
 
Old 12-03-2003, 07:55 AM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
your right, i shouldn't have put the www, wasn't thinking straight.

yer it would be http://forums.my_site.com/

i have a feeling that this was some thing to do with..

[CODE]VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
CODE]

but i dont quiet understand it...

tommytomato
 
Old 12-03-2003, 08:34 AM   #4
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
update

Quote:
Server configuration
# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *

<VirtualHost *>

DocumentRoot /www/example1
ServerName www.example1.com

# Other directives here


</VirtualHost>

<VirtualHost *>

DocumentRoot /www/example2
ServerName www.example2.org

# Other directives here


</VirtualHost>
from http://httpd.apache.org/docs-2.0/vhosts/ip-based.html

i'm taking a guess here

i add this to my httpd.conf

<VirtualHost *>

DocumentRoot /www/html/forums
ServerName forums.my_site.com

# Other directives here <------unsure what that means ?


</VirtualHost>


any one fill me in please.

tommytomato
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian a few Q's urquhartia Linux - Software 1 03-19-2005 06:37 AM
Just some Q's klunk Linux - Newbie 4 02-13-2005 11:40 PM
New here and got some Q's chivas Linux - Newbie 8 03-19-2004 11:36 AM
2 Q's, Hosting my domain and not http://myip, and VncServer port help yogee Linux - General 3 01-30-2004 03:04 AM
Gen q's waxy2k1 General 0 12-10-2003 07:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:06 PM.

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