Quantcast
Viewing latest article 4
Browse Latest Browse All 45

Answer by Tarik for How do I clone a Git repository into a specific folder?

Although all of the answers above are good, I would like to propose a new method instead of using the symbolic link method in public html directory as proposed BEST in the accepted answer. You need to have access to your server virtual host configurations.

It is about configuring virtual host of your web server directly pointing to the repository directory. In Apache you can do it like:

DocumentRoot /var/www/html/website/your-git-repo

Here is an example of a virtual host file:

<VirtualHost *:443>    ServerName example.com    DocumentRoot /path/to/your-git-repo    ...    ...    ...    ...</VirtualHost>

Viewing latest article 4
Browse Latest Browse All 45

Trending Articles