Ubuntu 16.04 Lumen PHP and Apache, only works the route / the others do not work

Asked

Viewed 418 times

0

Hello, I use Ubuntu 16.04 and installed apache and Lumen. I created a Lumen test project called financas.

The project folder is in the /var/www/html/sub-zero/financas folder

when accessing my browser localhost/sub-zero/financas/public, the return is ok...

however, when I try to access localhost/sub-zero/financas/a (which is a route I created to test) I get a 404 error return.

I have enabled apache mod_rewrite...

the error returned: The requested URL /var/www/html/sub-zero/financas/public/index.php was not found on this server.

Can anyone help me? I’ve tried virtualhosts, but I must be doing wrong, because it doesn’t work for anything

  • The question may be about Lumen, but the configuration of Laravel and Lumen is identical, just adjust by Apache http://answall.com/a/57871/3635, if it is a Shared server like this popular, just move the content of public in public_html and the rest outside it, as I explained here: http://answall.com/a/91799/3635

  • If in localhost/sub-zero/financas/public is working, the logical is that it will work localhost/sub-zero/financas/public/a and not localhost/sub-zero/financas/a.

  • @Daniel got it wrong there, the localhost/sub-zero/financas/public/a that doesn’t work at all...

  • @Guilhermenascimento in the case, is in the local Apache, on my same machine... Move the files from the public folder to the root folder, not solved

  • 1

    I found out here, in my . htaccess, I had to comment on the line Rewritebase /var/www/html/sub-zero/financas/public/

  • @Jdalri move the files I made it very clear that it was on SHARED servers. Watch out more carefully what was written please. In the links I posted there are several solutions like Virtualhost+Documentroot or use . htaccess itself to "remove" the public from the url.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.