Find the answer to your Linux question:
Results 1 to 8 of 8
I have this in my httpd.conf <VirtualHost *> ServerName www(dot)mydomain(dot)com DocumentRoot path ErrorLog path CustomLog path ServerAlias mydomain.com </VirtualHost> I am able to access site using www(dot)mydomain(dot)com I want to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4

    ServerAlias Issue ..


    I have this in my httpd.conf

    <VirtualHost *>
    ServerName www(dot)mydomain(dot)com
    DocumentRoot path
    ErrorLog path
    CustomLog path
    ServerAlias mydomain.com
    </VirtualHost>

    I am able to access site using www(dot)mydomain(dot)com

    I want to access my site .. using mydomain(dot)com
    Its show me "Red Hat Enterprise Linux Test Page"


    Please help me with this .

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,439
    hi,
    Add this:
    ServerAlias mydomain.com
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Hi ,

    Thanks for the reply ..

    I have tried that ..its not working .
    Please check the original port ...

    Is there anything that I must be doing ...

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,439
    ah sorry, you do have a serveralias already.

    Well, it should work.
    Did you restart apache after adding the serveralias?
    and does www.mydomain and mydomain resolve to the same IP?
    You must always face the curtain with a bow.

  6. #5
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    yes I restart the Apache after the changes.


    and does www(dot)mydomain and mydomain resolve to the same IP?
    can you clarify this ..

  7. #6
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,439
    Does this resolve to the same IP:
    Code:
    host www.mydomain.com
    host mydomain.com
    You must always face the curtain with a bow.

  8. #7
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Yes !! both resolve to same IP ..

    Thanks !

  9. #8
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,439
    Maybe there is an earlier server definition.
    Can you please do that in the apache config directory
    Code:
    egrep -ir '(listen|servername|serveralias)' *
    You must always face the curtain with a bow.

Posting Permissions

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