Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm trying to setup a small web hosting service on my computer at home where users within
my subdomain get their own hosting directory.ie.
richard.mydomain.com => /etc/www/html/richard/
steven.mydomain.com => /etc/www/html/steven/How would I make this possible?
are subdomain handled by the nameserver or by apache?
what tools would i need?I am currently own a domain, with A edits forwarded to my computer IP.
running Red Hat 7.2 and Apache 1.3

Open httpd.conf and add something like the following:
ServerAdmin vajra@quadratic.net
DocumentRoot /home/vajra/public_html/poperotica
ServerName www.poperotica.com
ErrorLog /var/log/httpd/www.poperotica.com-error_log
CustomLog /var/log/httpd/www.poperotica.com_log combinedServerAdmin monkeyboy@spankme.org
DocumentRoot /usr/local/apache/htdocs/mboy
ServerName monkeyboy.spankme.org
ErrorLog /var/log/httpd/monkeyboy.spankme.org-error_log
CustomLog /var/log/httpd/monkeyboy.spankme.org_log combined
ServerAdmin david@quadratic.net
DocumentRoot /mp3
ServerName mp3.quadratic.net
ErrorLog /var/log/httpd/mp3.quadratic.net-error_log
CustomLog /var/log/httpd/mp3.quadratic.net_log combined
... and read the following:http://www.devshed.com/Server_Side/Administration/MoreApache/MoreApache1/page1.html

Each subdomain must be present in the dns zone. At the end of the httpd.conf apache config file, you must add them in "virtual host" section. For each of them, you can specify home directory and options.
"VIRTUAL HOST 1.1.1.1"
ServerAdmin sub1@domain.com
DocumentRoot /home/httpd/sub1root
ServerName sub1.domain.com
ErrorLog /var/log/httpd/sub1-error_log
CustomLog /var/log/httpd/sub1-access_log common
"VIRTUAL HOST""VIRTUAL HOST 1.1.1.2"
ServerAdmin sub2@domain.com
DocumentRoot /home/httpd/sub2root
ServerName sub2.domain.com
ErrorLog /var/log/httpd/sub2-error_log
CustomLog /var/log/httpd/sub2-access_log common
"VIRTUAL HOST"

With each subdomain/virtual host created how do i notify the DNS table? Will i need to start a named server?

If you are already hosting your domain zone, just edit the zone and reload it. Add entry for each subdomain.

i wrote this in apache 1.3.24 (windows2k pro) and it didnt work, can somebody help me (drystun@hotmail.com)
"VIRTUAL HOST 64.231.50.50"
ServerAdmin drystun@hotmail.com
DocumentRoot c:/mp3/downloads
ServerName mp3.myserver.com
ServerAlias mp3.myserver.com
ErrorLog c:/log/httpd/mp3-error_log
CustomLog c:/log/httpd/mp3-access_log common
"VIRTUAL HOST"

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |