# Set documentroot (apache2)

**URL:** <https://www.ruby-forum.com/t/set-documentroot-apache2/136722>\
**Category:** Rails\
**Created:** [May 5, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/set-documentroot-apache2/136722 "2008-05-05T21:54:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [May 5, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/set-documentroot-apache2/136722/1 "2008-05-05T21:54:01Z")

</div>

Hi in default configuration file of apache i have insert this:  
Alias /miro “/var/www/tesi/public”  
\<Directory “/var/www/tesi/public”\>  
Options ExecCGI FollowSymLinks  
AddHandler fcgid-script .fcgi  
AllowOverride all  
Order allow,deny  
Allow from all

in .htaccess file i have insert:  
RewriteBase /miro/

if i launch [http://localhost/miro](http://localhost/miro)  
it works but the ilnks in the page send to [http://localhost/link](http://localhost/link) and not  
[http://localhost/miro/link](http://localhost/miro/link)

How i can do to set miro like document root?  
Thanks
