M
M
MakPET2016-03-13 21:20:49
Laravel
MakPET, 2016-03-13 21:20:49

What's wrong with Route?

+--------+----------+------+------+-------------------------------------------+------------+
| Domain | Method   | URI  | Name | Action                                    | Middleware |
+--------+----------+------+------+-------------------------------------------+------------+
|        | GET|HEAD | /    |      | Closure                                   |            |
|        | GET|HEAD | test |      | App\Http\Controllers\[email protected] | web        |
+--------+----------+------+------+-------------------------------------------+------------+

but with lav52.dev/test it gives
Not Found
The requested URL /test was not found on this server.
Apache/2.4.18 (Ubuntu) Server at lav52.dev Port 80

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Ernest Faizullin, 2016-03-13
@erniesto77

Perhaps you need to check if the mod_rewrite module is enabled in Apache. If it is connected and working, then there may be something wrong in .htaccess
UPD: As far as I understand, Apache was just installed, but mod_rewrite in Apache is not enabled by default, you have to enable it yourself. In the terminal , a2enmod rewrite , and in the /etc/apache2/apache2.conf config, edit the /var/www directory

<Directory /var/www/>
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Require all granted
</Directory>

and restart the server sudo service apache2 restart
UPD: if the problem is not in Apache, then try to run 3 commands in the terminal
php artisan cache:clear
php artisan route:clear
composer dump

A
Andrey Helldar, 2016-03-14
@Helldar

In addition to Ernest Faizullin's answer:
Author, check that the framework's launch path points exactly to the "public" folder:

<Directory /var/www/public/>
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Require all granted
</Directory>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question