31
Condor
6y

Tried deploying a new nginx server today, wrote the site config manually.

"Alright, done! Let's restart the service and look in the browser how it looks"

# systemctl restart nginx
> Process exited with error code.
"Fuuuuck..."
# nginx
> Unexpected } on line 13.

# vim /etc/nginx/sites-enabled/thatconfig.conf
"Wait wtf.. there's nothing wrong with the curly braces.. they're all opening and closing as they should..."
*takes another closer look*
Line 12, missed a fucking semicolon 😑
Append semicolon, :wq, # systemctl restart nginx
Works like a charm 🙄 all because of a stupid semicolon.

Until now I thought that the semicolon jokes were just lame.. but damn you semicolon, you are indeed the superior hide and seek player 😅

Comments
  • 10
    Never underestimate the power of a semicolon!
  • 5
    Semicolon, the inverted "where is waldo" of IT
  • 5
    SQL:
    syntax error NEAR line 1. Might be on line one but could be somewhere else. Usually a missed semi colon.

    RUST:
    not getting any output from a function that should return.

    The last line returns a value if it doesn't have a semi colon it, if it does it returns void.

    CONUSION:
    Semi colons hate us all when we both include them and exclude them.
  • 1
    I fucking hate nginx because of this
  • 3
    Always config test and echo $? in production
  • 2
    Luckily nginx usually tells you the error before doing a backflip and crashing, I usually use the nginx -s reload for it though
  • 4
    i made it a habit to always run an "nginx -t" before restarting anything when making changing in config, you never know when some stupid shit breaks the thing.
  • 2
    configtest ftw :v
  • 2
    Perhaps nginx should get a linter / prettier

    Edit: Nevermind it exists
  • 1
    nginx -t, always.
Add Comment