Menu

#4257 Virtualmin: when adding new site, NameVirtualHost directive is re-added

1.630
closed-fixed
nobody
5
2013-06-19
2013-06-17
No

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.

1 Attachments

Discussion

  • Luís Pedro Algarvio

    forgot to mention, but having duplicate namevirtualhost directives may lead to confusion in apache vhost engine.

     
  • Jamie Cameron

    Jamie Cameron - 2013-06-17

    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 .

     
  • Luís Pedro Algarvio

    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"

     
  • Jamie Cameron

    Jamie Cameron - 2013-06-18

    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.

     
  • Luís Pedro Algarvio

    /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

     
  • Jamie Cameron

    Jamie Cameron - 2013-06-19
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2013-06-19

    Thanks - the next Webmin release will handle this format correctly.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.