Skip to content

Instantly share code, notes, and snippets.

@dasbairagya
Last active July 24, 2021 10:00
Show Gist options
  • Save dasbairagya/2005abe5ba14e2d26a1a712a19f38ecd to your computer and use it in GitHub Desktop.
Save dasbairagya/2005abe5ba14e2d26a1a712a19f38ecd to your computer and use it in GitHub Desktop.
#Virtual Host setup in Apache | Linux

Virtual Host setup in Apache | Linux

๐Ÿ“Œ๏ธ sudo nano /etc/apache2/sites-available/platform.conf
 ๐Ÿ“Œ๏ธ add the following code-
<VirtualHost *:80>
    ServerAdmin me@myserver
    DocumentRoot /var/www/html/your_folder_name/ingrammicrocloud/web
    ServerName platform.local
    ServerAlias *.platform.local
    CustomLog /var/log/apache2/ingram.error.log combined
    <Directory /var/www/html/your_folder_name/ingrammicrocloud/web>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
	</Directory>
</VirtualHost>
๐Ÿ“Œ๏ธ sudo a2ensite platform
๐Ÿ“Œ๏ธ sudo nano /etc/hosts
 ๐Ÿ“Œ๏ธ add the bellow code-
    127.0.0.1    platform.local
๐Ÿ“Œ๏ธ sudo service apache2 restart

๐Ÿ‘‰๏ธAccess the project-------------
๐Ÿ“Œ๏ธ go to url and type platform.local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment