So my node requires port 30333 to peer with other nodes, and since I am using Nginx on the server, I followed this guide : https://wiki.polkadot.network/docs/maintain-guides-how-to-setup-a-validator-with-reverse-proxy.

In this guide there's one code block like this :

server {
  location / {
    proxy_pass http://localhost:30333;

which gives me the following issue :

nginx[83369]: nginx: [emerg] "location" directive is not allowed here in /etc/nginx/streams-enabled/polkadot-proxy.conf:3

Any ideas on how to fix this?

1 Answer 1


Your server block should be inside the http block.

Here is some details around it for the exact same error - https://stackoverflow.com/questions/20392741/nginx-errorlocation-directive-is-not-allowed-here-in-etc-nginx-nginx-conf76

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.