Tag Archives: http

check http2 support

if you are not sure if http2 is working:

echo | openssl s_client -alpn h2 -connect somedomain.lt:443 | grep -a ALPN
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = somedomain.lt
verify return:1
DONE
ALPN protocol: h2

h2 means http/2 is enabled

[access_compat:error] [pid 28167:tid 140515211155200] [client xx.xx.xx.xx:37918] AH01797: client denied by server configuration: /var/www/html/

Forbidden You don’t have permission to access / on this server

You should check directory permissions: namei -l /var/www/html/, if permissions are fine you need check virtual host configuration if there are no such options like ‘Deny from all’, if virtual host fine, you need search for .htaccess like this: find / -type f -name .htaccess

Primary script unknown error in php-fpm httpd rewrite

If you had something like this:
ProxyPassMatch “^/(.*\.php(/.*)?)$” “unix:/var/run/php-fpm/php.sock|fcgi://localhost/some/path” enablereuse=on

Advice is to change to SetHandler:


<Directory "/some/path">
<FilesMatch \.php$>
ProxyErrorOverride on
SetHandler "proxy:unix:/path/to/sock/php.sock|fcgi://localhost"
</FilesMatch>
</Directory>