Plesk Stuff

Set Real IP

Enable remoteip:

# plesk sbin httpd_modules_ctl --enable remoteip

Edit /etc/apache2/apache2.conf, change

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

to

LogFormat "%a %h  %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

Restart Apache

service apache2 reload

as Plesk has its own nginx proxy, best to add both sets of directives on the Apache & nginx Settings page for each domain

Under Additional Apache directives (both HTTP and HTTPS

RemoteIPHeader X-FORWARDED-FOR
RemoteIPTrustedProxy 192.88.134.0/23
RemoteIPTrustedProxy 185.93.228.0/22
RemoteIPTrustedProxy 66.248.200.0/22
RemoteIPTrustedProxy 208.109.0.0/22

Under Additional nginx directives 

real_ip_header X-Forwarded-For;
set_real_ip_from 192.88.134.0/23;
set_real_ip_from 185.93.228.0/22;
set_real_ip_from 66.248.200.0/22;
set_real_ip_from 208.109.0.0/22;

Enable GZIP

add the following to the “Additional nginx directives” field:

gzip         on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types   text/plain text/css application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary    on;

Cyber Recovery and Hygiene