a * Lab to make things

User Tools

Site Tools


Configure Apache Virtual Host

We assume you have a project on /~nameproject/www/name_of_my_project/

Now you would like to make it accessible from the outside e.g. At name_of_your_project.fabelier.org , and thus to use virtual-host for that.

Configuration File

$ sudo vi /etc/apache2/sites-available/name_of_your_project

<VirtualHost *:8080>
    ServerName name_of_your_project.fabelier.org
    ServerAlias name_of_your_project.fabelier.org
    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None

    Alias my_project "/~nameproject/www/name_of_my_project/"

    <Directory "/~nameproject/www/name_of_my_project/">
        Options MultiViews
        AllowOverride None
        Order deny,allow
        Allow from all

Restart apache


$ sudo service apache2 restart

Configure on your hosting provider the domain name and dns redirection if needed.

Enjoy your new virtual host!

doc/configure_apache_virtual_host.txt · Last modified: 2015/02/17 22:41 by k4ngoo