SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Scary's On The Wall
    Join Date
    Apr 2003
    Location
    PA
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can't configure domain using ServerAlias

    Hello all... I have a configuration file that looks something like this:

    Code:
    <VirtualHost *:80>
        ServerName domain.com
        ServerAlias *.domain.com www.domain.com
        DocumentRoot /home/domain/public_html
    </VirtualHost>
    I'm trying to add the following after that:

    Code:
    <VirtualHost *:80>
    ServerName test.domain.com
    DocumentRoot "/home/domain/public_html/virtual_host"
    </VirtualHost>
    However, going to test.domain.com will send you to /home/domain/public_html instead of /home/domain/public_html/virtual_host. Why? And how can I accomplish what I'm trying to do?

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    Scary's On The Wall
    Join Date
    Apr 2003
    Location
    PA
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind... I had been trying the correct configuration, but didn't realize that my .htaccess rewrite rules were affecting the new virtualhost as well, giving the illusion that the new virtualhost wasn't taking effect.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •