sudo chown -R apache:apache /var/www/html/{project}/storage
sudo chmod -R 775 /var/www/html/{project}/storage
sudo chcon -R -t httpd_sys_rw_content_t storage
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE database;
GRANT ALL PRIVILEGES ON database.* TO 'user'@'localhost';
composer install --optimize-autoloader --no-dev
Dont use sudo.
nano .env.example
then save the new file as .env
php artisan key:generate
php artisan migrate
php artisan db:seed
php artisan passport:install
php artisan config:cache
consider the front-end as well to be compiled properly for production. more
sudo nano /etc/httpd/conf.d/vhost1.conf
add the following configration:
<VirtualHost *:80>
DocumentRoot /var/www/html/App1/public
ServerName AppUrl.com
<Directory /var/www/html/App1/public/>
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I prefer adding each vhost in seperate file, although you can add them all together. more examples
sudo service httpd restart
httpd -S
apachectl -S
nohup php artisan queue:work --daemon &
Apache MPM (stands for Multi-Processing Module) to activate.
sudo nano /etc/httpd/conf.modules.d/00-mpm.conf
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
LoadModule mpm_event_module modules/mod_mpm_event.so
systemctl restart httpd