I am trying to deploy a laravel 5.1 project on an AWS EC2 cloud server and there is a problem with the laravel website route URLs.
I ran the following commands to configure the ubuntu 14.04 LTS EC2 server.
sudo apt-get install apache2
sudo apt-get install mysql-server php5-mysql
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
sudo apt-get install php5 php-pear
sudo apt-get install curl php5-curl php5-cli git
sudo a2enmod rewrite
sudo php5enmod mcrypt
sudo service apache2 restart
get the following error when trying to access route urls, but my homepage is loading correctly.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /register was not found on this server.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at xxxx.ap-southeast-2.compute.amazonaws.com Port 80
</address>
</body></html>
I changed the apache route URL to the shared folder of my laravel project without any success. I also tried to include the following virtual host file, but still got the same error.
<VirtualHost *:80>
ServerAdmin webmaster@mynewhost.com
DocumentRoot /var/www/html/mynewhost/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I ran the following command to grant permission to the storage folder
chmod -R 777 storage
Do I need to grant any permissions to my laravel project folder?
appreciate any help.