Installing nginx on Windows subsystem for Linux

Install nginix

sudo apt-get install nginx

Add the below line (in bold) to /etc/nginx/nginx.conf

user www-data;
master_process off;
worker_processes 4;

Comment out this line in /etc/nginx/sites-available/default

# listen [::]:80 default_server ipv6only=on;

$ sudo service nginx start

Test it out from the command line:


Should see HTML output for Welcome to nginx!

This entry was posted in Uncategorized. Bookmark the permalink.