3

I'm trying to run Laravel project on AWS EC2. It was working fine until uploaded a new version to deploy. All routes return error 404 except for '/' though all routes exist. httpd.conf in /etc/httpd/conf contains this

<Directory "/var/www">
AllowOverride All
# Allow open access:
Require all granted
</Directory>

I always execute these commands after deploying a new version

sudo chown -R ec2-user /var/app/current
sudo chmod -R 755 /var/app/current

I tried "sudo a2enmod rewrite" but I get "sudo: a2enmod: command not found"

Any solution?

PHP User
  • 2,350
  • 6
  • 46
  • 87

2 Answers2

0

Replacing the instance and re-deploying the app solved the problem

PHP User
  • 2,350
  • 6
  • 46
  • 87
0

After modifying /etc/httpd/conf/httpd.conf

You need to also restart httpd using sudo service httpd restart

Refer to Laravel ReST API URL 404 not found on AWS EC2 in Apache + mySQL environment - The request URL was not found on this server

Epping_
  • 29
  • 2
  • 6