Search
 
SCRIPT & CODE EXAMPLE
 

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>
Comment

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>
Comment

PREVIOUS NEXT
Code Example
Shell :: git add remote via ssh 
Shell :: how to stop a website running on port 8000 or any other port 
Shell :: install svgo linux 
Shell :: how to create tls.crt and tls.key 
Shell :: Scale fedora desktop size up 
Shell :: Mount builtin Google Drive on Startup on Ubuntu 
Shell :: how to hide log in background job in linux 
Shell :: how to make apache2 not autorestat when startup 
Shell :: how to clean snap linux 
Shell :: git add only c files 
Shell :: rubocop command to run auto correct 
Shell :: bash for tuple 
Shell :: bat current directory loop 
Shell :: got push SSH 
Shell :: Check Available SSH Keys on Your Computer 
Shell :: Bash script to check permission and store it 
Shell :: arcmenu fix 
Shell :: make diff git as commit 
Shell :: create a tar with folder content only 
Shell :: linux remove non empty directory 
Shell :: install foxit pdf reader on ubuntu 20.04 
Shell :: bash use variable in string 
Shell :: how to create a patch file between 2 branches git 
Shell :: stash a single file 
Shell :: linux while loop shell 
Shell :: create a new repository on the command line github 
Shell :: "set -x " bash 
Shell :: linux create file without content 
Shell :: new ip linux 
Shell :: heroku clone database local 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =