I'm trying to serve a Node application through Nginx on my Mac, and I've run into a problem.
On Ubuntu, I always change the config file to this
server { listen 80; server_name example.com; location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } but when I do the same on my Mac, I get this error when I'm running the server:
nginx: [emerg] "server" directive is not allowed here in /usr/local/etc/nginx/nginx.conf:1
Any suggestions on why this is happening would be appreciated.
nginx.conffile?