How to change ISPConfig 3 Default VHost Port

Discussion in 'Installation/Configuration' started by jackl, Feb 24, 2012.

  1. jackl

    jackl New Member

    Hi There!

    I'm installing Varnish Cache and varnish needs apache vhost to listen to the port is was assigned to, in my case port 8000. I copied ispconfig vhost.conf.master to conf-custom but the port has this:

    {tmpl_var name='port'}​

    I assumed that ISPConfig3 GUI has this setting under webserver settings but there is no field for VHost Port, I only see Apps VHost Port.

    Is there any other part of ISPConfig3 GUI that hides apache vhost port? If no, is it safe to just change:

    {tmpl_var name='port'}​

    to

    8000​

    Thanks!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    That should work.
     
  3. scarleo

    scarleo New Member

    Doesn't work if you have SSL enabled for the site in question as this will also modify the SSL VirtualHost port from 443 to 8000. I really think we should have a setting for this in ispconfig3 interface. If there already is one I would be very happy if someone could point me to where it is.

    EDIT: This works if you have SSL for the site, just in case someone else is looking for a solution. Not really sure abt the tmpl syntax so it might be a bit redundant, but it works ;) :

    <tmpl_loop name="vhosts">
    <tmpl_if name='port' op='==' value='80'>
    <VirtualHost {tmpl_var name='ip_address'}:8000>
    </tmpl_else>
    <tmpl_if name='port' op='==' value='443'>
    <VirtualHost {tmpl_var name='ip_address'}:443>
    </tmpl_if>
    </tmpl_if>
     
    Last edited: Sep 15, 2013
    linus likes this.
  4. linus

    linus Member

    Thank you Scarleo, that worked!
     

Share This Page