apache 2.2: how can I set up a VirtualHost inside the RootDirectory?

Posted by redraw on Super User See other posts from Super User or by redraw
Published on 2013-11-07T21:40:01Z Indexed on 2013/11/07 22:00 UTC
Read the original article Hit count: 122

Filed under:

I want to set up a VirtualHost inside the RootDirectory. For example,

My project is in C:/myproject

and I want to access with http://localhost/myproject

EDIT:

I've made an alias inside the httpd-vhosts.conf, however I don't have permissions.

<VirtualHost *:80>
    DocumentRoot "C:/apache-2.2/htdocs"
    ServerName localhost
    Alias /test "D:\arbol\documentos\test"  
</VirtualHost>

Is this code below the proper way to give permissions?

<VirtualHost *:80>
    DocumentRoot "C:/apache-2.2/htdocs"
    ServerName localhost
    Alias /test "D:\arbol\documentos\test"  

      <Directory "D:\arbol\documentos\test">        
        allow from all
        order allow,deny
        AllowOverride All
      </Directory>

</VirtualHost>

© Super User or respective owner

Related posts about apache