Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

install composer per project in multiple php version

#must have .env

sudo /usr/bin/php7.3 /usr/local/bin/composer install --ignore-platform-reqs
sudo /usr/bin/php7.3 artisan key:generate
sudo chmod -R 755 /var/www/site1.your_domain
sudo chmod -R 777 /var/www/site1.your_domain/storage

sudo nano /etc/apache2/sites-available/site1.your_domain.conf

# and add this
<VirtualHost *:80>
    ServerAdmin admin@site1.your_domain
    ServerName site1.your_domain
	ServerAlias www.site1.your_domain
    DocumentRoot /var/www/site1.your_domain/public
   # DirectoryIndex index.php
    <Directory /var/www/site1.your_domain>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Order allow,deny
       allow from all
    </Directory>
   <FilesMatch .php$>
       # From the Apache version 2.4.10 and above, use the SetHandler to run PHP as a fastCGI process server
        SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost"
   </FilesMatch>
    ErrorLog ${APACHE_LOG_DIR}/site1.your_domain_error.log
    CustomLog ${APACHE_LOG_DIR}/site1.your_domain_access.log combined
</VirtualHost>
 
PREVIOUS NEXT
Tagged: #install #composer #project #multiple #php #version
ADD COMMENT
Topic
Name
9+4 =