How to define several VirtualHost with apache 2 and ubuntu 10.4?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sedigh mohseni
    New Member
    • Feb 2011
    • 64

    How to define several VirtualHost with apache 2 and ubuntu 10.4?

    hi
    I'd like to define virtual host for testing my site locally
    i put folders of my sites with name byttes and dms in /home/sepideh/www/ path.
    Then i change file in path /etc/apache2/sites-enables/000-default and i add below lines
    Code:
    <VirtualHost>
    ServerRoot /home/sepideh/www/byttes
    ServerName byttes.ir
    ServerAlias byttes.ir
    </VirtualHost>
    
    <VirtualHost>
    ServerRoot /home/sepideh/www/dms
    ServerName dms.com
    ServerAlias dms.com
    </VirtualHost>
    too, i change hosts file in path /etc/hosts
    and i add 127.0.0.1 byttes.ir
    127.0.0.1 dms.com
    and the restart apache via /etc/init.d/apache2 restart
    but i unfortunately see below error with restart apache
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [ OK ]


    with typing byttes.ir or dms.com in the browser url i see below content

    Not Found

    The requested URL / was not found on this server.
    Apache/2.2.14 (Ubuntu) Server at dms.com Port 80

    would you please help me to solve problem
    thanks alot for your help.
  • sedigh mohseni
    New Member
    • Feb 2011
    • 64

    #2
    i found problem i wrote ServerRoot instead of DocumentRoot
    with this change i answer correctly but i still get the same final error about apache that is as follow as

    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [ OK ]

    Comment

    Working...