Computing.Net > Forums > Networking > Apache, subdomain

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Apache, subdomain

Reply to Message Icon

Name: Eddie
Date: March 31, 2002 at 19:39:11 Pacific
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: me
Date: April 1, 2002 at 09:20:18 Pacific
Reply:

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 combined

ServerAdmin 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


0

Response Number 2
Name: danny
Date: April 1, 2002 at 10:36:53 Pacific
Reply:

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"



0

Response Number 3
Name: Eddie
Date: April 1, 2002 at 11:43:08 Pacific
Reply:

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


0

Response Number 4
Name: danny
Date: April 1, 2002 at 14:31:26 Pacific
Reply:

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



0

Response Number 5
Name: peter
Date: June 21, 2002 at 08:22:26 Pacific
Reply:

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"


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Networking Forum Home


Sponsored links

Ads by Google


Results for: Apache, subdomain

CGI, in Apache on Win98 www.computing.net/answers/networking/cgi-in-apache-on-win98/2561.html

use apache server www.computing.net/answers/networking/use-apache-server-/17734.html

Apache server from home network www.computing.net/answers/networking/apache-server-from-home-network/20584.html