Switch to ternary operator to simplify setting nginx domain

6 line code reduction