LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2003, 03:52 AM   #1
ziggie216
Member
 
Registered: Oct 2003
Posts: 176

Rep: Reputation: 30
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.
 
Old 11-12-2003, 02:36 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
ServerName should also be the name of your subdomain in the second virtual host.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 1.3.33 and subdomain fai Linux - Software 1 07-15-2005 03:49 AM
Yet another apache domain/subdomain problem xtra Linux - Newbie 2 08-18-2004 07:30 AM
Subdomain help DoobyWho Linux - General 3 04-14-2003 06:51 PM
how to setup subdomain for users in apache? earl Linux - Security 5 12-05-2002 07:49 AM
Subdomain and apache! eXor Linux - Networking 1 10-13-2002 05:49 PM


All times are GMT -5. The time now is 02:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration