LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   subdomain and apache (https://www.linuxquestions.org/questions/linux-newbie-8/subdomain-and-apache-115123/)

ziggie216 11-12-2003 03:52 AM

subdomain and apache
 
if my domain is mydomain.com and I want to have a subdomain called picture.mydomain.com is this information correct?

<VirtualHost mydomain.com>
DocumentRoot /var/www/html
ServerName mydomain.com
ErrorLog /var/log/httpd/error_log
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost picture.mydomain.com>
DocumentRoot /var/www/html/picture
ServerName mydomain.com
DirectoryIndex index.php index.html index.htm index.shtml
ErrorLog /var/log/httpd/error_log
</VirtualHost>

Also I have picture.mydomain.com w/ DNS Host (A) pointing to my ip.

david_ross 11-12-2003 02:36 PM

ServerName should also be the name of your subdomain in the second virtual host.


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