wsl issue code visual studio not working windows 10 ubuntu console

I installed docker desktop and ubuntu on windows 10. I followed the following tutorial:
https://code.visualstudio.com/docs/remote/wsl-tutorial

When I was trying to run on the ubuntu console. I got the following error:

/usr/share/code/bin/../code: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

I did not install VS code through the installer due of this error was coming.
Fix for this is.

Run this command on the Ubuntu console:

alias code="/mnt/c/NON-INSTALLED-SOFTWARES/VSCode-win32-x64-1.61.0/Code.exe"

This fixed my issue.

How to install Nginx and PHP on Ubuntu

For this tutorial I am using the Ubuntu 8.10 linux version. We given very easy steps for installing php and ngnix and configuration details.

How to install Nginx and PHP on Ubuntu

Install Nginx
# sudo apt-get install nginx

If apache server is installed on your machine then please stop the apache server first.

#sudo /etc/init.d/nginx start

#sudo update-rc.d nginx defaults

Install PHP5

#sudo apt-get install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

Open the PHP.ini file

#sudo vim /etc/php5/cgi/php.ini

Insert following line at the end of php.ini file
cgi.fix_pathinfo = 1

Install the lighttpd server

#sudo apt-get install lighttpd

You will see an error message saying that lighttpd couldn’t start because port 80 is already in use.

For removing the error message use following command

#sudo update-rc.d -f lighttpd remove

Start the FastCGI daemon service

#sudo /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid

If you want run following command whenever you boot the system. Open following file.

#sudo vim /etc/rc.local

Copy paste following following lines in file.

/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid

Configuration Nginx

#sudo vim /etc/nginx/nginx.conf
Just copy paste the following code in end of httpd block. Dont paste outside of http block.

server {
listen 80;
server_name _;

access_log /var/log/nginx/localhost.access.log;

location / {
root /var/www/nginx-default;
index index.php index.html index.htm;
}

location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}

location /images {
root /usr/share;
autoindex on;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache’s document root
# concurs with nginx’s one
#
location ~ /\.ht {
deny all;
}
}

How to install Nginx and PHP on Ubuntu
How to install Nginx and PHP on Ubuntu

Just restart the Nginx server.

#sudo /etc/init.d/nginx restart