Hey
When adding new site to Virtualmin, if adding also a virtual host in apache, Virtualmin keeps re-adding the NameVirtualHost directives to apache2.conf
NameVirtualHost shared_ip:port_http
NameVirtualHost shared_ip:port_https
It's ignoring the fact that i already have these NameVirtualHost directives set in another file, ports.conf, in the code blocks supplied in the attachment.
Same behavior for HTTP(80) and HTTPS(443) ports, which i assume are read from virtualmin site templates.
forgot to mention, but having duplicate namevirtualhost directives may lead to confusion in apache vhost engine.
Ok, the problem here is that Virtualmin doesn't how about that HTTP_PORT_443 and HTTP_PORT_80 variables, so skips those IfDefine blocks. You can either just remove the <IfDefine> and </IfDefine> lines, or go to Webmin -> Servers -> Apache Webserver -> Edit Defined Parameters and enter HTTP_PORT_443 and HTTP_PORT_80 .
there are present in the envvars file (can't re-add them in the interface?)
Webmin reports:
"Note that the following defined parameters are already known : APACHE_RUN_DIR=/var/run/apache2 APACHE_LOCK_DIR=/var/lock/apache2 APACHE_LOG_DIR=/var/log/apache2 APACHE_PID_FILE=/var/run/apache2.pid APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data APACHE_ARGUMENTS=-DHTTP_PORT_80 -DHTTP_PORT_443 SUFFIX= LANG=C"
Where is this envvars file on your system? Also, which Linux distribution/OS and version are you running there?
Webmin should be able to pick this up automatically.
/etc/apache2/envvars: added this line
export APACHE_ARGUMENTS='-DHTTP_PORT_80 -DHTTP_PORT_443'
Debian 7.0, two machines - 32bit @linode.com and 64bit @home
Thanks - the next Webmin release will handle this format correctly.