docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec nginx-mailcow nginx -t

Category: Mail Servers & Postfix

docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec nginx-mailcow nginx -t

Test the nginx configuration inside the container

nginx -t parses every server block and reports syntax errors with file and line numbers. Run it before restarting nginx-mailcow after editing files under data/conf/nginx. Exit code zero means the config is valid and safe to reload.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.