Problems with varnish, the website give me error 400 bad request

Keywords: Apache Airflow - AWS - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: 80e04d47-dd40-e0f8-e5cd-ad3461ab4f5c
Description:
Hi i have problem with Varnish when i start the services:

bitnami@ip-172-26-10-66:~$ sudo /opt/bitnami/ctlscript.sh start
/opt/bitnami/mysql/scripts/ctl.sh : mysql started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
Error:
Message from VCC-compiler:
Unterminated string at
(’/opt/bitnami/varnish/etc/varnish/default.vcl’ Line 124 Pos 27)
return(synth(403, "For security reasons, this URL is only accessible using
--------------------------#########################################################

Running VCC-compiler failed, exited with 2
VCL compilation failed
/opt/bitnami/varnish/scripts/ctl.sh : varnish could not be started

Also i can’t see the website from my static ip, can you please help nme?
Thanks

Hi @francescomassari.web,

Did you modify anything in the default.vcl file? Can you edit the file, go to the mentioned line and set the error message to a single line?

Your current file has this information around the mentioned line

sub vcl_recv { if ((req.url ~ "^/phpmyadmin/.*$" || req.url ~ "^/phppgadmin/.*$"
    || req.url ~ "^/server-status.*$") && client.ip != "127.0.0.1") {
        return(synth(403, "For security reasons, this URL is only accessible using
        localhost (127.0.0.1) as the hostname."));
    }
}

But it should be shown in this way instead

sub vcl_recv { if ((req.url ~ "^/phpmyadmin/.*$" || req.url ~ "^/phppgadmin/.*$"
    || req.url ~ "^/server-status.*$") && client.ip != "127.0.0.1") {
        return(synth(403, "For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname."));
    }
}

Ok now it is working, i have to understand why the website give me the error 400, thanks

Hi @francescomassari.web,

Is the issue solved now?

Regards,
Michiel

c9b03623-ada9-1c8e-bcc9-173bed5beeec
Not at all, can you please check, now i’ve got an error 403…thanks in advance

Hi @francescomassari.web,

Can you tell me which of the 2 errors you getting?

Regards,
Michiel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.