Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple
adding virtual domain on dns server.
needed package "apache2"
+ make webdir
sudo mkdir -p /var/www/blabla.com/public_html
+ set permissions
sudo chown 755 /var/www/blabla.com/
+ make something like index.html
sudo touch /var/www/blabla.com/public_html/index.html
+ make virtual host file.
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/blabla.com
+ edit it (blabla.com)
sudo nano /etc/apache2/sites-available/blabla.com
- insert it
ServerName blabla.com
+ if you need accessible from morethan one name.
<VirtualHost *:80>
ServerAdmin faqih@blabla.com
ServerName blabla.com
ServerAlias blabla.com
DocumentRoot /var/www/blabla.com/public_html
</VirtualHost>
+ make it acticved
sudo a2ensite blabla.com
+ restart it!!
sudo /etc/init.d/apache2 restart
+ add your domain on hosts
nano /etc/hosts
- and, add this line
192.168.1.1 blabla.com
++++++Finish++++++++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.