Varnish + Apache + ISPconfig3

Discussion in 'Installation/Configuration' started by Ilko, Dec 30, 2015.

  1. Ilko

    Ilko New Member

    I know there are such threads, but what I would like to do is a little bit different, so I would like to hear any opionons on the matter. What I currently have is Apache + Ispconfig3 latest versions for production, which I installed 1 year ago using the perfect server tutorial. I want to add Varnish to the set-up, but leaving anything on the server to its defaults and only redirecting the traffic to Varnish using iptables rule like this one for example:

    #iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 6081

    This way I will not have to change anything to the Varnish configuration other than the port it listens to, if I want it to listen on other port than its default one. No changes will be made to Ispconfig3, or Apache as well. I like to keep the things as much to their defaults as possible. Simply installing Varnish on the server via apt-get install Varnish and applying the rule above.

    So what do you think ? Will it work, will there be any issues and should I redirect SSL port as well, or other ports. The iptables is lightweight so I assume there will not be any load issues, but still, has anyone tried that? Please let me know your thoughts.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I haven't tried it with iptables, until now I used the normal approach with apache HTTP port listening on localhost plus different port and varnish listening on port 80 globally.
  3. Ilko

    Ilko New Member

    Hi Till,
    thank you for the follow-up on the matter. I have not tried it (at least for now) as well. But I would like to keep everything as much stock as it could be. This way I will not have to edit the ISPconfig template for creating Vhosts in Apache for the port, actually I will not have to edit anything. I suppose it will be better during updates of the server, that everything is stock.
    I will try it soon and let you know how it goes. In the meant time, if anyone is using this configuration, please let me know, if I should watch for something ...

Share This Page