Skip to content

Instantly share code, notes, and snippets.

@jack2jm
Last active February 12, 2024 05:51
Show Gist options
  • Select an option

  • Save jack2jm/65e13a8079508d5e4db127f98d715996 to your computer and use it in GitHub Desktop.

Select an option

Save jack2jm/65e13a8079508d5e4db127f98d715996 to your computer and use it in GitHub Desktop.
Here is basic thing to deploy laravel project to server.
1. Clone project to /var/www/html and respective folder.
2. Put.htaccess file to that folder - Link - https://drive.google.com/file/d/1fT-rkw9ZMJp_Hr4kKOBJ1m37rpz6XA3R/view?usp=sharing
3. If still its not working - then Server - rewrite rule is not working. needs to be updated it.
4. Go to /etc/apache2/apache2.conf file.
Make it like this
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All <----------- by default its None - make it to All
Require all granted <------------ denied by default
</Directory>
5. Restart apache
sudo service restart apache2
6. Give basic permissions
sudo chmod -R 777 storage
sudo chmod -R 777 public/assets
sudo chmod -R 777 bootstrap/cache
php artisan storage:link (link storage to public).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment