Reputation: 1253
I develop a laravel app which I deployed to aws.
using the following steps
I create an ec2 instance which has a security group that allows https from anywhere, ssh from anywhere, mysql from an ip address
loggedin using ssh
changed directory to /var/www/
removed the default html file and created a directory
cd into the directory
updated the server
installed php dependencies, composer and git
pulled my files from git
changed ownership and permission of the directory
After deploying everything worked perfect
this is default.conf
<virtualHost *:80>
ServerAdmin [email protected]
ServerName http://18.189.174.42
ServerAlias http://18.189.174.42
DocumentRoot /var/www/laraqueue/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/laraqueue>
Require all granted
AllowOverride All
Options Indexes Multiviews FollowSymLinks
</Directory>
</virtualHost>
but when I tried loading the page
I get error Connection timed out
Please what could be the cause of this problem.
Upvotes: 0
Views: 1246
Reputation: 620
Clone Repository in server.
Cd into directory cd project_name
.
Run composer install
.
Create .env
file normally that file is ignored by .gitignore.
Give permission 775 or change user to www-data for storage, bootstrap directory.
chmod -R 775 storage/ bootstrap/
Give permission
chown-r www-data storage/ bootstrap/
Change directory owner
Run php artisan key:generate
.
Change directory path to your project's public folder in default.conf
file.
/etc/apache2/site-available/default.conf
.
Upvotes: 1