Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    Default virtualhost custom directive problem

    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. #2
    cPanel Staff
    Join Date
    Mar 2007
    Posts
    113

    Default

    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. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    Default

    Thank you very much for the help.

  4. #4
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    704

    Default

    Quote Originally Posted by ironmanjakarta View Post
    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.
    That'd be better handled as a parked domain

  5. #5
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    Default

    Ah! Ok I'll try that then. Sounds easier too. :-)

    Quote Originally Posted by cpdan View Post
    That'd be better handled as a parked domain

Similar Threads & Tags
Similar threads

  1. Custom VirtualHost configurations
    By jez9999 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-01-2010, 11:06 PM
  2. Custom Virtualhost config
    By ttremain in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-13-2010, 05:55 PM
  3. Custom VirtualHost Directive Syntax
    By jayronc in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-23-2008, 03:23 PM
  4. VirtualHost directive
    By wisenerl in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-15-2007, 11:02 AM
  5. Problem!! [warn] VirtualHost x.x.x.x:80 overlaps with VirtualHost x.x.x.x:80
    By psnsupport in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-17-2005, 04:34 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube