D
D
djdnkey2021-10-28 16:52:48
Nginx
djdnkey, 2021-10-28 16:52:48

Why is nginx config not working?

Ubuntu 20.04.2
nginx version: nginx/1.21.3
OpenResty
project folder /home/ivan/hello config
directory path: /home/ivan/hello/conf
/home/ivan/hello/conf/nginx.conf

worker_processes 1;
    
    events {
      worker_connections 1024;
    }
    
    http {
       server {
         listen 8081;
    
         location / {
            default_type text/plain;
            content_by_lua_block{ ngx.say("Hello world") }
         }
       }
    }


In the terminal:
nginx -p /home/ivan/hello -t
works fine

nginx -p /home/ivan/hello
starts up

But the url 127.0.0.1:8081 doesn't work, why?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question