0

I have a laravel app and my client needs to access it via subfolder (let's say clientdomain.com/laravelapp/). I have already moved the contents of laravel's /public/ folder to /laravelapp and setup the index.php file so it references the right path.

I ended up with the following structure:

- /public_html (webroot of the server)
    - /myapp/ (this is the public folder that was inside the laravel project)
    - /laravel-framework (this is the laravel project folder with controllers, views, vendors, etc)

It works ok when I access the main route (clientdomain.com/laravelapp), it shows views, images and everything ok. The problem is when I try to access a different route, it shows 404.

I can't manually setup the nginx conf file, but ISPConfig has a box for nginx directives.

What are the right directives for a setup like mine?

I thank you in advance.

chuysbz
  • 1,262
  • 6
  • 18
  • 47
  • how did you configure laravel to listen for public folder on this specific path? if you just moved the folder, it's not going to work, you need to tell laravel where it is. – Ricardo Vigatti Nov 18 '18 at 17:15

1 Answers1

0

Try to add this to box for nginx directives.

location / {
    try_files $uri $uri/ /index.php?$args;
}
Shimazakhi
  • 31
  • 3