LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   APACHE and Subdomains (https://www.linuxquestions.org/questions/linux-software-2/apache-and-subdomains-288264/)

basketkase999 02-09-2005 04:40 PM

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.

sigsegv 02-09-2005 08:45 PM

Covered in TFM -- httpd.apache.org

wooot 05-03-2005 09:55 AM

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

basketkase999 05-03-2005 12:18 PM

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.

wooot 05-03-2005 12:42 PM

an example would be nice

wooot 05-03-2005 02:34 PM

hmmm :(

basketkase999 05-03-2005 09:18 PM

<VirtualHost *:80>
ServerAdmin webmaster@yoursite.com
DocumentRoot /var/www/html5
ServerName forums.yoursite.com
ErrorLog logs/forums.yoursite.com-error_log
</VirtualHost>

sigsegv 05-04-2005 01:07 AM

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

CustomLog logs/yoursite.com-access.log combined

wooot 05-04-2005 03:37 AM

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 :confused:

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

basketkase999 05-04-2005 04:11 PM

don't put the 127.0.0.3 in <VirtualHost 127.0.0.3>. leave it <VirtualHost *.80>

wooot 05-04-2005 06:51 PM

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

wooot 05-08-2005 07:33 AM

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

wooot 05-08-2005 07:59 AM

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 :scratch: :rolleyes:

basketkase999 05-08-2005 03:02 PM

If you use Yahoo domains, you can use unlimited subdomains!

wooot 05-08-2005 03:18 PM

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


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