Varnish in front of Apache on ISPConfig 3.0.4

Discussion in 'Installation/Configuration' started by jdenoy, Jan 16, 2012.

  1. jdenoy

    jdenoy New Member

    Hello,

    I'm looking for a way to change the default port from 80 to some other ports in the apache configuration to install varnish in front of it.

    I'm seen how to change the configuration for nginx, but nothing for apache (or at least didn't find it).

    Anyone have an idea on where I can find this?

    Thanks,

    Johan
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    See config file templates in /usr/local/ispconfig/server/conf/ if you like to edit the apache vhost file defaults.
     
  3. jdenoy

    jdenoy New Member

    Hello Till,

    in fact i saw the vhost.conf.master file, but It was talking about a variable named 'port'. I was more looking into modifying this value et modifying the vhosts files already created to reflect the modifications done.

    Do you know where this value is to be changed?

    Thks,
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The port variable is coded fixed in the apache plugin, but you dont have to change any code to use custom ports. Just replace this line in the template:

    Code:
    <VirtualHost {tmpl_var name='ip_address'}:{tmpl_var name='port'}>
    with e.g.:

    Code:
    <tmpl_if name='ssl_enabled'>
    <VirtualHost {tmpl_var name='ip_address'}:1234>
    <tmpl_else>
    <VirtualHost {tmpl_var name='ip_address'}:12345>
    </tmpl_if>
    
    where 1234 is your new ssl port and 12345 is your new non ssl port.
     
  5. jdenoy

    jdenoy New Member

    thks a lot
     
  6. jaypabs

    jaypabs Member

    May I know what file to edit? Is it apache_ispconfig.conf.master or vhost.conf.master?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the vhost.conf.master file.
     
  8. jaypabs

    jaypabs Member

    Thanks.

    Do I need to change all variables:

    tmpl_var name='port'

    to:

    tmpl_var name='8080'?
     

Share This Page