LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Subdomain help (https://www.linuxquestions.org/questions/linux-general-1/subdomain-help-54991/)

DoobyWho 04-14-2003 09:02 AM

Subdomain help
 
I have a client who has us serving a development box in house. I've set it up and allowed the outside world to access it through the router. Now, my question is. We've set up subdomain.ourdomain.com to point to our servers IP address and it works fine. But how do i set it up so that it automatically gets directed to a specific directory? I'm guessing it has something to do with DNS? How do I get redhat 8 to take any requests coming from subdomain.ourdomain.com and send it to /var/html/thisdirectory instead of /var/html ?

green_dragon37 04-14-2003 09:09 AM

Im going to assume that youre using apache and are talking about serving web pages. If so, then you want Virtual Hosts.

Apache's docs on this are here. http://httpd.apache.org/docs-2.0/vhosts/

DoobyWho 04-14-2003 11:01 AM

So basically just add in:


<VirtualHost *>

DocumentRoot /var/html/thisdirectory
ServerName subdomain.ourdomain.com

</VirtualHost>

????

green_dragon37 04-14-2003 06:51 PM

Yes. Here is an example one of mine:

Code:

<VirtualHost *>
        ServerName centuroncomputers.staticcling.net
        DocumentRoot /home/centuron/public_html
        ServerSignature email
        DirectoryIndex index.php index.html index.htm index.php
        LogLevel warn
        HostNameLookups off
</VirtualHost>


green_dragon37


All times are GMT -5. The time now is 05:35 PM.