This morning I finally had time to configure my new hosting in a2hosting.com. Did some configs on ssh access, git access, and etc… But what I really wanted to share is, how would you point your projectname/public folder to your public_html. We’re going to do this by linking public folder to public_html
SSH into your server.
ssh -p 22 email@example.com
Folder structure should be something like this.
public_ftp/ public_html www
In current directory, clone your project.
git clone https://firstname.lastname@example.org/yourname/blog.git blog
blog public_ftp/ public_html www
!Important: If you have something on public_html I would recommend to backing it up. Becase the next step that we will do is make sure that public_html is deleted.
mv ~/public_html ~/public_html_backup
Now to the last step, again, make sure public_html is deleted, and then create link.
ln -s ~/blog/public ~/public_html
That’s it! check your site www.yourdomain.com and to make sure everything works. If things are not working great, delete public_html and do the last step
ln -s ~/blog/public ~/public_html. chow!—