Skip to content

joelparkerhenderson/demo-nginx-njs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Demo NGINX NJS

Demo of NGINX webserver and NJS JavaScript.

Setup

Ubuntu

Install the necessary module for NGINX JavaScript and any other modules you want, such as:

sudo apt-get -y install libnode-dev
sudo apt-get -y install nginx-module-njs

Copy the demo code file demo_nginx_njs.js to your NGINX configuration directory, such as /etc/nginx.

Edit your NGINX configuration file, such as /etc/nginx/nginx.conf, and insert the lines from the file nginx.conf.

Edit your NGINX server configuration file, such as /etc/nginx/conf.d/server.conf, and insert the lines from the file server.conf.

Reload NGINX, such as:

sudo service nginx reload

Browse to your new script, such as: http://localhost:8080/demo-hello.html

About

Demo of NGINX webserver and NJS JavaScript

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published