The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

virtualhost custom directive problem

Discussion in 'General Discussion' started by ironmanjakarta, May 17, 2008.

  1. ironmanjakarta

    ironmanjakarta Registered

    Joined:
    Jan 7, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I tried to add ServerAlias mail.mydomain.com to a custom virtual host directive file in the
    /usr/local/apache/conf/userdata/std/2/user/mydomain directory so if someone tries to access the domain by typing mail.domain.com it will just redirect to domain.com.

    But when I run the verify_vhost_includes script is says its "broken." Is this a bug? I don't see why this is would be invalid.
     
  2. jdlightsey

    jdlightsey Perl Developer III
    Staff Member

    Joined:
    Mar 6, 2007
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Houston Texas
    cPanel Access Level:
    Root Administrator
    Apache doesn't provide any way of testing directives within a specified context. verify_vhost_includes is testing your include using "httpd -t -f" which causes Apache to treat it as if it was the main httpd.conf file. If you have an include with a single ServerAlias directive, this type of test will cause an error like this:

    ServerAlias only used in <VirtualHost>

    I wouldn't worry about it. Your include fine is fine. It's the test that's not reliable here.
     
  3. ironmanjakarta

    ironmanjakarta Registered

    Joined:
    Jan 7, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thank you very much for the help. :)
     
  4. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    That'd be better handled as a parked domain
     
  5. ironmanjakarta

    ironmanjakarta Registered

    Joined:
    Jan 7, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ah! Ok I'll try that then. Sounds easier too. :)

     
Loading...

Share This Page