MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: Spacedust on 2013-01-04, 20:38:24

Title: Apache does not start when Varnish on ports 80/443
Post by: Spacedust on 2013-01-04, 20:38:24
I did this:

Code: [Select]
1. copy '/home/apache/tpl/domains.conf.tpl' to '/home/apache/tpl/custom.domains.conf.tpl' and '/home/apache/tpl/defaults.conf.tpl' to '/home/apache/tpl/custom.defaults.conf.tpl'
2. edit custom.* files in portion:
Code: [Select all] [Show/ hide]

if ($reverseproxy) {
    $ports[] = '30080';
    $ports[] = '30443';
} else {
    $ports[] = '80';
    $ports[] = '443';
}


for '80' and '443' to another port where varnish call apache.
3. run 'sh /script/fixweb' and 'service httpd restart'

but it shows this:

Code: [Select]
(98)Address already in use: make_sock: could not bind to address [::]:8080
                                                           [FAILED]

There is nothing on port 8080:

Code: [Select]
[root@ks391381 /]# lsof -i :8080
[root@ks391381 /]#
Title: Re: Apache does not start when Varnish on ports 80/443
Post by: Tsanten on 2013-01-04, 21:46:40
Try to change only 80 port to 8080 and let 443 stay
Title: Re: Apache does not start when Varnish on ports 80/443
Post by: Spacedust on 2013-01-04, 21:55:44
Yes, correct. 443 is going directly from Apache, so Varnish doesn't use it. I will try.
Title: Re: Apache does not start when Varnish on ports 80/443
Post by: Tsanten on 2013-01-04, 22:14:42
Varnish forward only 80 port not 443 . So 443 should be taken directly by apache.
Title: Re: Apache does not start when Varnish on ports 80/443
Post by: Spacedust on 2013-01-05, 00:32:18
Ok. It works. I had to switch to Lighttpd and back to Apache.