Skip to content

raushan9038/Laravel_env_setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Laravel_env_setup

  1. apt-get update -y

  2. apt upgrade -y 3 . apt install apache2 -y

  3. apt install php7.4 libapache2-mod-php7.4 php7.4-curl php-pear php7.4-gd php7.4-dev php7.4-zip php7.4-mbstring php7.4-mysql php7.4-xml curl -y

  4. vi /etc/php/7.4/apache2/php.ini

  5. systemctl start apache2

  6. systemctl enable apache2

  7. curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer chmod +x /usr/local/bin/composer

  8. composer --version

  9. cd /var/www/html

  10. composer create-project laravel/laravel projectname --prefer-dist

  11. cd projectname

  12. php artisan -----> we will see the laravel version

  13. chown -R www-data:www-data /var/www/html/projectname

  14. chmod -R 775 /var/www/html/projectname/storage

  15. nano /etc/apache2/sites-available/laravel.conf

<VirtualHost *:80> ServerName ip address of the server ServerAdmin [email protected] DocumentRoot /var/www/html/projectname/public <Directory /var/www/html/projectname> AllowOverride All ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

  1. a2ensite laravel.conf
  2. a2enmod rewrite
  3. systemctl restart apache2

Now we can access the Laravel app by ip address of the server.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published