Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to get varnish to work with Litespeed on both HTTP and HTTPS.

The problem I am having is that Litespeed offset's BOTH the HTTP and HTTPS port.

So in my current setup, I have set the offset to 8000, this causes Litespeed to listen on both port 8080 and 8443 for HTTP and HTTPS respectively.

I have varnish set up on port 80 and it proxies litespeed on 8080 correctly.

My question is: Is it possible to configure iptables in such a way to allow a user to request Litespeed over HTTPS on port 443, and get a proper response?

I have the following rule for incoming traffic, which as far as I can tell correctly connects to the litespeed socket on 8443:

iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443

What more needs to be done to get this setup to work correctly?

share|improve this question
    
You're on the right track. The output of iptables -nvL and iptables -nvL -t nat would help debug this. IIRC you still need to accept traffic to port 8443 in the INPUT chain. –  mgorven Apr 14 '12 at 7:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.