LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-09-2005, 04:40 PM   #1
basketkase999
Member
 
Registered: Dec 2004
Location: ca
Posts: 61

Rep: Reputation: 15
APACHE and Subdomains


So I was curious if anyone can tell me how to setup a subdomain using Apache 2.0 running off of RHL 9.0? I would appreciate it greatly.
 
Old 02-09-2005, 08:45 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Covered in TFM -- httpd.apache.org
 
Old 05-03-2005, 09:55 AM   #3
wooot
Member
 
Registered: Mar 2005
Posts: 90

Rep: Reputation: 15
i'm trying todo the same thing as basketkase999 with no success

i'm thinking this can only be done from a hosting company that has all tools to setup subdomains in dns ect ect

example of what i want todo

turn www.mysite.com/forums

into

forums.mysite.com

the dns for mysite.com points to my ip address, any help on this will be appreciated

Last edited by wooot; 05-03-2005 at 10:34 AM.
 
Old 05-03-2005, 12:18 PM   #4
basketkase999
Member
 
Registered: Dec 2004
Location: ca
Posts: 61

Original Poster
Rep: Reputation: 15
I figured out how to do it. All you have to do is create a virtual domain in apache for abc.yoursite.com. If you need an example, let me know.
 
Old 05-03-2005, 12:42 PM   #5
wooot
Member
 
Registered: Mar 2005
Posts: 90

Rep: Reputation: 15
an example would be nice
 
Old 05-03-2005, 02:34 PM   #6
wooot
Member
 
Registered: Mar 2005
Posts: 90

Rep: Reputation: 15
hmmm
 
Old 05-03-2005, 09:18 PM   #7
basketkase999
Member
 
Registered: Dec 2004
Location: ca
Posts: 61

Original Poster
Rep: Reputation: 15
<VirtualHost *:80>
ServerAdmin webmaster@yoursite.com
DocumentRoot /var/www/html5
ServerName forums.yoursite.com
ErrorLog logs/forums.yoursite.com-error_log
</VirtualHost>
 
Old 05-04-2005, 01:07 AM   #8
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Assuming you want the access logs broken out for that domain, you'll also want:

CustomLog logs/yoursite.com-access.log combined

Last edited by sigsegv; 05-04-2005 at 01:10 AM.
 
Old 05-04-2005, 03:37 AM   #9
wooot
Member
 
Registered: Mar 2005
Posts: 90

Rep: Reputation: 15
i cant get that working, going through a proxy service to test the domain results in sub.mysite.co.uk not being found but mysite.co.uk goes to the sub DocumentRoot

i figured out how to do it local below

<VirtualHost 127.0.0.3>
DocumentRoot /srv/www/htdocs/sub
ServerName sub.mysite.co.uk
ServerAdmin admin@mysite.co.uk
</VirtualHost>

and putting 127.0.0.3 sub.mysite.co.uk in ect/hosts works fine
 
Old 05-04-2005, 04:11 PM   #10
basketkase999
Member
 
Registered: Dec 2004
Location: ca
Posts: 61

Original Poster
Rep: Reputation: 15
don't put the 127.0.0.3 in <VirtualHost 127.0.0.3>. leave it <VirtualHost *.80>
 
Old 05-04-2005, 06:51 PM   #11
wooot
Member
 
Registered: Mar 2005
Posts: 90

Rep: Reputation: 15
yeah works ok as well

so the way you have it set up can you access your websites/subdomains from another internet connection or proxy

have you set up a dns servers and entered your name server at your domain registrar like below

ns1.yourdomain.com

and then setup your sub domains in the dns server as well
 
Old 05-08-2005, 07:33 AM   #12
wooot
Member
 
Registered: Mar 2005
Posts: 90

Rep: Reputation: 15
been working on this again today, i found that i can change where www.mysite.com goes

www.mysite.com = points to the forum
mysite.com = main website

but using any other subdomain apart from www. doesnt work. Does anyone think it can be the proxy i am using (pipex.net they use squid) i have also used the cloak proxy with the same results.

been trying to get this working for a week now
 
Old 05-08-2005, 07:59 AM   #13
wooot
Member
 
Registered: Mar 2005
Posts: 90

Rep: Reputation: 15
well i'v come to the conclusion that the domain registry has www. included in as standard and resolves to my ip address if i want any more sub domains i have to upgrade my package to a hosting package which defeats the purpose of hosting from my server
 
Old 05-08-2005, 03:02 PM   #14
basketkase999
Member
 
Registered: Dec 2004
Location: ca
Posts: 61

Original Poster
Rep: Reputation: 15
If you use Yahoo domains, you can use unlimited subdomains!
 
Old 05-08-2005, 03:18 PM   #15
wooot
Member
 
Registered: Mar 2005
Posts: 90

Rep: Reputation: 15
i think i'm going to use dyndns.org as i have a dynamic IP and my router supports them as well. only 13 a year

Ability to create unlimited A records (hosts)
Ability to create unlimited CNAME records (aliases)
Ability to create unlimited MX records (Mail eXchangers) of various priorities

http://www.dyndns.org/services/dns/custom/features.html
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache subdomains like Samba home-shares toffi22 Linux - Software 1 01-30-2005 07:16 PM
apache userdir subdomains kodon Linux - Networking 7 08-09-2004 07:16 PM
Subdomains & Apache Vhosts Big Brad Linux - Newbie 8 01-28-2004 09:36 PM
Apache and Subdomains, Help pzorn Linux - General 2 01-27-2004 07:00 PM
accessing subdomains through network (apache) niehls Linux - Networking 3 03-16-2003 04:29 PM


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

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 Google+: linuxquestions
Open Source Consulting | Domain Registration