Virtual Host: Document Root question

Discussion in 'Apache' started by smilesmita234, Jun 2, 2009.

  1. #1
    I have apache 2 installed and i am trying to get 2 sites working. First site is working -www.abc.com.i am trying to get the other one working-blog.abc.com

    i created 2 virtual hosts entry:

    NameVirtualHost 00.00.000.000:80


    <VirtualHost 00.00.000.000:80>
    DocumentRoot /var/www/sites/abc.com
    ServerName 00.00.000.000
    <Directory "/var/www/sites/abc.com">
    Allow from all
    AllowOverride All
    Options +Indexes
    </Directory>

    </VirtualHost>


    <VirtualHost 00.00.000.000:80>
    DocumentRoot /var/www/sites/abc.com/wordpress/readme.html
    ServerName blog.abc.com
    <Directory "/var/www/sites/abc.com/wordpress/readme.html">
    Allow from all
    AllowOverride All
    Options +Indexes
    </Directory>
    </VirtualHost>


    After restarting apache i get the following error:

    Warning: DocumentRoot [/var/www/sites/abc.com/wordpress/readme.html] does not exist

    Any idea what is going on?

    I try accessing this folder through www.abc.com/wordpress/readme.html and i was able to see the page.

    permissions on this folder is 755.
     
    smilesmita234, Jun 2, 2009 IP
  2. jnugroho73

    jnugroho73 Peon

    Messages:
    77
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    /var/www/sites/abc.com/wordpress/readme.html <== is this a folder? :confused:
     
    jnugroho73, Jun 4, 2009 IP
  3. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #3
    DocumentRoot should be a folder not a file.
     
    kailash, Jun 20, 2009 IP