Tuesday, 22 June 2021

Apache 2 conf-avaialble vs sites-available and how to enable disable them in ubuntu

 conf-enabled is for global configuration excerpts that affect all vhosts. sites-enabled should only contain complete vhost definitions.

Of course, you can also include conf-enabled/* in your vhost definition if that makes sense in your setup.


https://serverfault.com/questions/934786/apache2-sites-enabled-vs-conf-enabled




To check if config is enabled

need to go to /etc/apache2/conf-enabled

to view list of config go to 

/etc/apache2/conf-avaialble


http://manpages.ubuntu.com/manpages/bionic/man8/a2enconf.8.html

enable conf 

sudo a2enconf my-conf

sudo systemctl apache2 reload


disable conf

sudo a2disconf my-conf

sudo systemctl apache2 reload



To check if site is enabled

need to go to /etc/apache2/sites-enabled

to view list of config go to 

/etc/apache2/sites-available



http://manpages.ubuntu.com/manpages/bionic/man8/a2ensite.8.html

enable sites

sudo a2ensite my-conf

sudo systemctl apache2 reload


disable conf

sudo a2dissite my-conf

sudo systemctl apache2 reload



No comments:

Post a Comment