How to Deploy Multiple Dist file to the Apache Server
To Deploy Multiple Dist file apache server the Easiest way i have describe below follow the instruction whether your project would be html, PHP or any dist file such as angular you can follow the below Steps.
To Deploy any project to the Apache Server We have to make changes in 2 files and one folder. Follow the below process to Deploy the dist file.
• Rename the dist file to the project name and copy the file to the Path /var/www/html/
• Make changes in the Index.html or Index.php by giving folder name in base href e.g., /foldername/
• Now Go to /etc/apache2/sites-available and make copy of 000-default.conf or any pervious file for example healthgiggle.conf
Copy command
cp -r healthgiggle.conf /etc/apache2/sites-available/pjname.conf
• Now open the file in vi editor vi pjname.conf and make changes
ServerName: Your project name which will appear in URL after main domain e.g., healthgiggle/projectname
DocumentRoot: Path of the project
Press Esc :wq Enter to save the vi file
• After saving the pj.conf go to /etc/apache2/apache2.conf and add the Directory and give the project path
<Directory /var/www/html/pjname/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
• Now restart the apache server
sudo service apache2 restart
• Now check in the browser your domainname/projectname the site will be appearing.
Note: Use same name for project folder and conf