Deploy Laravel in var/www/html

2.3k views Asked by At

I have the following file structure on my server

/var/laravelapp -> this is the entire laravel project.

/var/www/html/eduapp - > this is the public_html folder which has a folder called eduapp with the public contents of laravelapp.

The login register and home page work https://example.com/eduapp/

when i click on the other buttons in the homepage the url becomes https://example.com/routename therefore giving an error

if we manually add eduapp in the link eg. https://example.com/eduapp/routename it works!!

any suggestions or solutions?

1

There are 1 answers

0
DarrenChand On BEST ANSWER

so these are the things that made the app work

  1. Changed APP_URL to example.com/eduapp.
  2. Changed back button hrefs to href='../routename'.
  3. Created Symlinks for public/img and storage folders.
  4. Removed Slash from href routes.