0

I tested my web.php and it is working. I even tried it with simple code:

Route::get('foo', function () { return 'Hello World'; });

and i get a 404 error.

Also: On the subdomain.example.com i get my custom programmed laravel 404 error but on subdomain.example.com/foo i get a 404 apache error.

The apache error:

Not Found

The requested URL was not found on this server.
Apache/2.4.18 (Ubuntu) Server at subdomain.example.com Port 80

Why are my routes not working?

Why is there a laravel error on "/" and a (i assume) apache error on "/foo"?

1 Answer 1

1

This is not a Laravel issue, you need to set the Apache configuration file for setting the document root to your Laravel project's public folder.

Sign up to request clarification or add additional context in comments.

11 Comments

Considering this,(for debugging reasons) should "subdomain.example.com/public/foo" work or is it normal that it doesnt?
Well, it would work if you have proper .htaccess file. If not, you need to do "subdomain.example.com/public/index.php/foo"
I assume that you have registered "subdomain.example.com" to your hosts right? @OvnIvn
yes, the subdomain was set up for me. There is another main project on example.com
Did you add virtual host entry on httpd-vhosts.conf?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.