Here are some simple steps to migrate Apache’s configuration from an Arch GNU/Linux-based distro to a Debian GNU/Linux-based distro.
systemctl stop apache2
cd /etc/apache2
- backup the
apache2.conf
file - copy the original file
httpd.conf
from Arch and rename it toapache2.conf
-
go through all the modules and enable them with this command:
a2enmod ${module_name}
- remove all the
LoadModule
directives -
add this at the end of
apache2.conf
:# Include generic snippets of statements IncludeOptional conf-enabled/*.conf # Include the virtual host configurations: IncludeOptional sites-enabled/*.conf Include /etc/apache2/mods-enabled/*.load Include /etc/apache2/mods-enabled/*.conf
- copy the extra configurations you think are useful from Arch, located in
/etc/httpd/conf/extra
, into/etc/apache2/conf-available
and enable them witha2enconf ${conf_name%%.conf}
-
chage some variables in
apache2.conf
:ServerRoot "/etc/apache2" User www-data Group www-data
- run
systemctl restart apache2