1

I have recently installed virtualmin on ubuntu 20.04 with lamp stack and don't know how to deploy laravel. I want to deploy with git The main problem is of directory. I want to deploy in /home/fantasy/public_html/website then my index.php will be in /home/fantasy/public_html/public when I created git repository by services> git repository, the git directory created in /home/fantasy/public_html/git/fantasy-website.git also guide how to change other apache settings or any other references I have successfully pushed from my local computer to server but my post-receive file not working. may be permission issue and don't know how to give permission to write in public_html/website folder. I tested by cloning from remote to my local computer and cloned successfully. my post-receive file: #!/bin/sh git --work-tree=/home/fantasy/public_html/website --git-dir=/home/fantasy/public_html/git/fantasy-website.git checkout -f

The only command I run to give permission for post-receive file:
chmod +x post-receive
I'm new to virtualmin so please guide in detail step by step.

regards

Amir
  • 91
  • 3
  • 11
  • you would normally log in to your server using ssh. Then deploy the code as usual on any other linux servers. VirtualMin is no difference. Virtual min is just there for server configuration or for server admins. You can create virtual host in virtual min to direct the incomming request to server document. All you need is apache server, mysql server and php and git installed. – Deepesh Thapa Oct 09 '20 at 16:12

1 Answers1

0

To deploy your laravel app on virtualmin you need to adjust your virtualhost file,

You create your virtual server and go to /etc/apache2/sites-available/your-website.conf edit the line

DocumentRoot /home/yourwebsite-directory/public_html/
to
DocumentRoot /home/yourwebsite-directory/public_html/public

Restart apache and the app should work fine.

Fatih Toprak
  • 1,097
  • 1
  • 19
  • 48