↑ ↓ select, Enter open, Esc close

nginx

nginx as a web server or as a reverse proxy in front of Apache, as usual with Plesk: test the configuration, reload it, check redirects and headers.

12 one-liners: 11 harmless, 1 caution, 0 destructive

All nginx one-liners

Check the browser caching headers of a file

$curl -sI https://example.com/wp-includes/css/dist/block-library/style.min.css | grep -iE "^(cache-control|expires|etag|last-modified|age):"
harmless

Check the nginx configuration for syntax errors

#nginx -t
harmless

Check whether a website serves gzip or Brotli

$curl -s -o /dev/null -D - -H "Accept-Encoding: br, gzip" https://example.com/ | grep -i "^content-encoding"
harmless

Check whether a website supports HTTP/2

$curl -sI --http2 https://example.com/ | head -1
harmless

Check whether nginx is enabled in Plesk

#plesk sbin nginxmng --status
harmless

Detect the web server and PHP version from HTTP headers

$curl -sI https://example.com/ | grep -iE "^(server|x-powered-by|via):"
harmless

Server is clean. Is the site?

How fast does the website really load?

GENLOC.SEO measures PageSpeed and Core Web Vitals on mobile and desktop and tells you clearly what to fix first. Free, no time limit.

by GENLOC.NETWORK, the team behind myline.de

Find the cause of a 502 Bad Gateway in the nginx log

#grep -E "upstream|connect\(\) failed" /var/log/nginx/error.log | tail -20
harmless

Show all nginx server_name entries with their config file

#nginx -T 2>/dev/null | grep -E "^# configuration file|server_name "
harmless

Show the additional nginx directives of a Plesk domain

#cat /var/www/vhosts/system/example.com/conf/vhost_nginx.conf
harmless

Show the nginx configuration Plesk generated for a domain

#cat /var/www/vhosts/system/example.com/conf/nginx.conf
harmless

Show the nginx version and compiled-in modules

$nginx -V 2>&1 | tr " " "\n" | grep -E "version|_module"
harmless

Test the nginx configuration and reload only on success

#nginx -t && systemctl reload nginx
caution

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.