Nginx: nginx: [emerg] directive "proxy_pass" is not terminated by ";" in /etc/nginx/sites-enabled/app:15
A directive's arguments run into the next line because the ; is missing (or a quote is unbalanced).
nginx: [emerg] directive "proxy_pass" is not terminated by ";"[emerg] directive is not terminated by ";" in /etc/nginx[emerg] invalid number of arguments in "server_name" directive[emerg] unknown directive in /etc/nginx[emerg] invalid parameter "x" in /etc/nginx Meaning
The error names the directive and line. Check for the missing semicolon at the end of that directive, an unclosed quote inside the value, or a stray {/}. Also "invalid number of arguments in X directive" means wrong argument count.
Common causes
- Missing
;at the end of the line - Unclosed quote in a value
- Special characters not quoted (
$,;) - Wrong number of arguments
- Line break inside a value
⚡ Quick fix
- Add
;to the named directive - Quote values with spaces/special characters
- Run
nginx -tafter each change
Detailed fix by platform
Linux
sudo nginx -tprints the exact line
How to diagnose
- Directive — Named in message?
- Quote — Balanced?
- Args — Right count?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- AH00526: Syntax error on line of apache config Apache: AH00526: Syntax error on line 12 of /etc/apache2/sites-enabled/site.conf: Invalid command 'Foo', perhaps misspelled or defined by a module not included in the server configuration
- could not build the server_names_hash, you should increase server_names_hash_bucket_size Nginx: nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 64
- nginx: [emerg] open() failed (2: No such file or directory) Nginx: nginx: [emerg] open() "/etc/nginx/snippets/fastcgi-php.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/app:20
Most viewed in Nginx / Apache
- upstream timed out Nginx: upstream timed out (110: Connection timed out) while reading response header from upstream
- AH00558 Apache: AH00558: apache2: Could not reliably determine the server's fully qualified domain name
- AH00072: make_sock: could not bind to address 0.0.0.0:80 Apache: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 / AH00015: Unable to open logs
Other ways to find it
Where this error sits
Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026