Creating a new virtual host
This page describes how to create a new Elentra vhost instance locally, in order to avoid switching versions in the same vhost (and the mayhem that typically ensues)
Steps
cd ~/Documents/elentra-developercp resources/vhosts/elentra-1x-me.localhost.conf resources/vhosts/uni-elentra.localhost.conf# Disable so that CSS/JS will refresh properly. EnableSendfile On <VirtualHost *:80> ServerName uni-elentra.localhost # <- CHANGE # Required because of /etc/httpd/conf.d/php.conf hardcoded defaults <IfModule mod_php7.c> php_value session.save_handler redis php_value session.save_path "tcp://redis:6379?auth=password" </IfModule> DocumentRoot /var/www/vhosts/uni-elentra-1x-me/www-root # <- CHANGE <Directory "/var/www/vhosts/uni-elentra-1x-me/www-root"> # <- CHANGE Options FollowSymLinks Require all granted AllowOverride all </Directory> <FilesMatch \.(php|phar)$> SetHandler "proxy:unix:/var/run/php-fpm/www.sock|fcgi://localhost" </FilesMatch> ProxyPass "/app/" "ws://localhost:${WEBSOCKET_PORT}/app/" ProxyPassReverse "/app/" "ws://localhost:${WEBSOCKET_PORT}/app/" ProxyPass "/apps/" "http://localhost:${WEBSOCKET_PORT}/apps/" ProxyPassReverse "/apps/" "http://localhost:${WEBSOCKET_PORT}/apps/" </VirtualHost><FilesMatch \.(php|phar)$> SetHandler "proxy:unix:/var/opt/php/7.4/run/php-fpm/www.sock|fcgi://localhost" </FilesMatch>./developer down ./developer up
127.0.0.1 uni-elentra.localhostcd ~/Sites git clone [email protected]:MyUni/elentra-1x-me.git uni-elentra-1x-me git clone [email protected]:MyUni/elentra-1x-api.git uni-elentra-1x-api./developer shell cd /var/www/vhosts/uni-elentra-1x-me composer install npm install npm run buildCREATE DATABASE uni_elentra_auth; CREATE DATABASE uni_elentra_me; CREATE DATABASE uni_elentra_me_clerkship; CREATE DATABASE uni_elentra_cbe; GRANT ALL PRIVILEGES ON uni_elentra_auth.* TO elentra; GRANT ALL PRIVILEGES ON uni_elentra_me.* TO elentra; GRANT ALL PRIVILEGES ON uni_elentra_me_clerkship.* TO elentra; GRANT ALL PRIVILEGES ON uni_elentra_cbe.* TO elentra;php elentra migrate --up
Last updated