Reputation: 5157
I am getting a 404 when trying to access any other routes except '/' in my laravel project
my dhavalchheda.conf file is as follows
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/dhavalchheda/public/
ServerName dhavalchheda.com
ServerAlias www.dhavalchheda.com
<Directory /var/www/html/dhavalchheda/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/dhavalchheda.com-error_log
CustomLog /var/log/apache2/dhavalchheda.com-access_log common
</VirtualHost>
my laravel folder structure is
dhavalchheda -> full laravel project
I am not able to understand the mistake so please assist
Upvotes: 0
Views: 48
Reputation: 21681
I think you have to enable your rewrite module of apache service. So try with below command to run your all other routes:
sudo a2enmod rewrite
and restart the apache service:
sudo service apache2 restart
Hope this works for you too.
Upvotes: 1