jenvillarreal
Technical User
I have a website that I want a subdomain to go to a subdirectory of the main site. For example, I want sub.mydomain.com to go to mydomain.com/sub.
I have the subdomain working, but it just goes to the main site. I know I need a DNS entry in the zone file, and I did that by making an A record and pointing it to the IP of the main site like this:
$ORIGIN mydomain.com.
mail IN A 123.12.123.123
ftp IN A 123.12.123.123
www IN A 123.12.123.123
sub IN A 123.12.123.123
I also made a VirtualHost entry in the http.conf file that looks like this:
<VirtualHost sub.mydomain.com>
User myuser
Group mygroup
ServerName sub.mydomain.com
ServerAdmin webmaster@mydomain.com
DocumentRoot /home/mydir/mydomain-TransferLog /home/mydir/mydomain-logs/access-log
ScriptAlias /cgi-bin/ /home/mydir/mydomain-</VirtualHost>
I am obviously doing something wrong. Can someone please help me out! Thanks in advance, -Jenn.
I have the subdomain working, but it just goes to the main site. I know I need a DNS entry in the zone file, and I did that by making an A record and pointing it to the IP of the main site like this:
$ORIGIN mydomain.com.
mail IN A 123.12.123.123
ftp IN A 123.12.123.123
www IN A 123.12.123.123
sub IN A 123.12.123.123
I also made a VirtualHost entry in the http.conf file that looks like this:
<VirtualHost sub.mydomain.com>
User myuser
Group mygroup
ServerName sub.mydomain.com
ServerAdmin webmaster@mydomain.com
DocumentRoot /home/mydir/mydomain-TransferLog /home/mydir/mydomain-logs/access-log
ScriptAlias /cgi-bin/ /home/mydir/mydomain-</VirtualHost>
I am obviously doing something wrong. Can someone please help me out! Thanks in advance, -Jenn.