Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create the project outside the /var/www/ directory?

I've a Ubuntu server with static IP for testing purpose, I'd like to create a project (for example hello-world) outside the /var/www/ directory, let's say in this location(/home/username/webroot/hello-world/). It should be accessible via browser like this http://xxx.xxx.xxx.xxx/hello-world/ How do I do this?

like image 438
ralixyle Avatar asked Apr 05 '13 08:04

ralixyle


1 Answers

I would use an Alias:

Alias /hello-world /home/www/foo
<Directory "/home/www/foo">
    Options -MultiViews -FollowSymLinks +SymLinksIfOwnerMatch
    AllowOverride all
</Directory>
like image 116
rekire Avatar answered Sep 28 '22 10:09

rekire