I want to apply some configuration, which to be common for all vhosts and want to include it to all of them. According EA4 documentation I have to use /etc/apache2/conf.d/userdata/$includename.conf file.
For example I'm trying with a simple redirect rule:
However in http.conf configs in userdata dir are not included and configuration is not loaded. Here are all includes in http.conf
Am I doing something wrong?
Edit: It's missed in the documentation that you need to run
For example I'm trying with a simple redirect rule:
Code:
cat /etc/apache2/conf.d/userdata/redirect.conf
RewriteEngine on
RewriteRule ^test$ http://test.com [L,R=302]
Code:
grep -i include /etc/apache2/conf/httpd.conf | grep -v "#"
Include "/etc/apache2/conf.modules.d/*.conf"
Include "/etc/apache2/conf.d/includes/pre_main_global.conf"
Include "/etc/apache2/conf.d/*.conf"
Include "/etc/apache2/conf.d/includes/account_suspensions.conf"
Include "/etc/apache2/conf.d/includes/errordocument.conf"
Include "/etc/apache2/conf.d/includes/pre_virtualhost_global.conf"
Include "/etc/apache2/conf.d/includes/post_virtualhost_global.conf"
Edit: It's missed in the documentation that you need to run
Code:
/scripts/ensure_vhost_includes --all-users
Last edited: