catch all for apache?

Discussion in 'Installation/Configuration' started by lerra, Feb 24, 2006.

  1. lerra

    lerra New Member

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I'am not sure, but as far as i remember you can do wildcards like * but not host.*
  3. lerra

    lerra New Member

    So with other words, there is no sollution? What about site/webmail etc? that woud be nice too..
  4. falko

    falko Super Moderator ISPConfig Developer


    Can you explain a bit more?
  5. st2xo

    st2xo New Member

    I set up that webmail-host configuration at my site and it works well.

      # edit this vHost template in  /root/ispconfig/scripts/lib/config.lib.php
      # otherwise it will be overwritte on every host change in ISPConfig!
      ServerName localhost
      ServerAdmin root@localhost
      # This will be the default root for domains connected on this server 
      # but with no ISPConfig setup
      # put in there a index.html like "this domain is connected - no homepage available"
      DocumentRoot /home/HOSTNAME/public_n05
    this is the first virtual host setting in Vhosts_ispconfig.conf and will be overwritten every time you change host settings with ISPConfig - so you have to patch the config.lib.php near line 1231 - search for the textphrase "NameVirtualHost schreiben"

    now adding the subdomain webmail.* for every host on the system:

      ServerAlias webmail.*
      ServerAdmin root@localhost
      DocumentRoot /home/USER/public_webmail
      CustomLog /var/log/apache2/ combined
    I dont know what happens, if you add a subdomain "webmail" directly in the ISPConfig Hostsetting. Look in httpd.conf which *conf-directory will be read by apache at first. I think the first *.conf wins the match ...

    other virtual hosts in vhosts.d will work with the same procedure, e.g.
    ServerAlias config.*
    ServerAlias phpmyadmin.*​

    the index.html´s in that public_html - directorys redirects the users to the correct sites

    and so the users only have to know the easy to type hostname like or and what ever you like.

    hope that helps ....
  6. st2xo

    st2xo New Member

    I forget something

    you have to edit the /etc/apache/httpd.conf

    <directory ~ "/public_webmail|public_phpmyadmin|public_config/">
        AllowOverride None
        Order allow,deny
        Allow from all

Share This Page