Apache 2 HTTP Server site creation and removing tools using command line.
| Name | Version |
|---|---|
| Ubuntu | >= 16.04 |
| Apache | >= 2 |
From PPA:
sudo add-apt-repository ppa:tarkhov/ppa
sudo apt update
sudo apt install a2sitesudo a2mksite mydomain mysite.conf ~/myfolder 127.0.0.1This command will create:
- Virtual host
/etc/apache2/sites-available/mysite.confwith url http://mydomain. - Folder
~/myfolder. - Record in
/etc/hosts- mydomain 127.0.0.1.
sudo a2mksite mydomainThis command will create:
- Virtual host
/etc/apache2/sites-available/mydomain.confwith url http://mydomain. - Folder in current directory with name mydomain.
- Record in
/etc/hosts- mydomain 127.0.0.1. - Restart web server.
sudo a2rmsite mydomain mysite.conf ~/myfolder 127.0.0.1sudo a2rmsite mydomain| Alias | Command |
|---|---|
a2d |
a2disable |
a2dc |
a2disconf |
a2dm |
a2dismod |
a2ds |
a2dissite |
a2e |
a2enable |
a2ec |
a2enconf |
a2em |
a2enmod |
a2es |
a2ensite |
a2l |
a2list |
a2mk |
a2mksite |
a2rl |
a2reload |
a2rm |
a2rmsite |
a2rs |
a2restart |
a2s |
a2start |
a2sp |
a2stop |
a2st |
a2status |
To completely remove the package run the command:
sudo apt remove --purge a2siteAlexander Tarkhov
This project is licensed under the MIT License - see the LICENSE file for details.