Install Nginx, PHP, MySQL and uWSGI for Python cgi

The Experiment: In this experiment were going Install Nginx, PHP and uWSGI for CGI scripting on Raspberry Pi with Raspbian Wheezy. Will configure uWSGI for Python CGI scripts. .

Table of Contents

1. Project Progress
2. Part List
3. Software
4. Prototype
5. Notes
6. Conclusion
7. Reference Links


Project Progress

Nov 1, 2015: Started working on this experiment on Oct 30, 2015, had a lot of problems getting the Display / USB sound card to work, but after 20 hours finally have it working. See Prototype / Notes for details. The USB Sound Card in photo won’t work.
^Top


Part List:

1. Raspberry Pi B+
2.
^Top


Software:

1. Raspbian Wheezy
2. Nginx
3. PHP
4. uWSGI
5. JAVA
5. Putty
6. WinSCP

^Top


Prototype:

Step 1.
1. Download the Raspbian Debian Wheezy here
2. Installing Operating System Images here Linux Mac OS Windows

At Boot-up: or sudo raspi-config
1. 1. Expand Filesystem <Select> <Enter> <Ok> <Enter>
2. 8. Advanced Options <Select> <Enter>
3. A4 SSH <Select> <Enter> <Enable> <Enter> <Ok> <Enter>
4. <Finish> <Yes> <Enter>
5. Login: pi <Enter>
6. Password: raspberry <Enter>

At Command Prompt:

pi@raspberry - $
Step 1. 
Type: sudo apt-get update
Step 2.
Type: sudo apt-get upgrade
      Do you want to continue [Y/n]? Y <Enter>

Install Software:

----------------------------------------------------------------------
Install NGINX - PHP - MySQL - uWSGI
----------------------------------------------------------------------
Step 1. 
Type: sudo apt-get install nginx php5-fpm php5-curl php5-gd php5-cli php5-mcrypt php5-mysql php-apc mysql-server
      Do you want to continue [Y/n]? Y <Enter>
      New password for the MySQL "root" user: <Type Password> <Enter>
      Repeat password for the MySQL "root" user: <Type Password> <Enter>

Step 2. Edit nginx.conf
Type: sudo nano /etc/nginx/nginx.conf
      user www-data;
      Change: worker_processes 4 to 2;
      pid /var/run/nginx.pid;
      
      events {
      worker_connections 768;
      # multi_accept on;
      }

http {

      ##
      # Basic Settings
      ##
      
      sendfile on;
      tcp_nopush on;
      tcp_nodelay on;
      Change: keepalive_timeout     10 10;
      Add: send_timeout             10;
      Add: client_header_timeout    10;
      Add: client_body_timeout      10;
      types_hash_max_size 2048;
      Un-Comment: server_tokens off;

      # server_names_hash_bucket_size 64;
      # server_name_in_redirect off;

      include /etc/nginx/mime.types;
      default_type application/octet-stream;

      ##
      # Logging Settings
      ##

      access_log /var/log/nginx/access.log;
      error_log /var/log/nginx/error.log;

      ##
      # Gzip Settings
      ##

      gzip on;
      gzip_disable "msie6";

      Un-comment: gzip_vary            on;
      Un-comment: gzip_proxied        any;
      Un-comment: gzip_comp_level       6;
      Un-comment: gzip_buffers      16 8k;
             Add: gzip_min_length    1100; 
      Un-comment:  gzip_http_version  1.1;
      Change -> gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
      To this -> gzip_types text/plain text/css applciation/json application/x-javascript text/xml application/xml application/rss+xml text/javascript images/svg+xml application/x-font-ttf font/opentype application/vnd.ms-fontobject;

      ##
      # nginx-passenger config
      ##
      # Uncomment it if you installed nginx-passenger
      ##

      #passenger_root /usr;
      #passenger_ruby /usr/bin/ruby;

      ##
      # Virtual Host Configs
      ##

      include /etc/nginx/conf.d/*.conf;
      include /etc/nginx/sites-enabled/*;
}

#mail {
      # # See sample authentication script at:
      # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
      #
      # # auth_http localhost/auth.php;
      # # pop3_capabilities "TOP" "USER";
      # # imap_capabilities "IMAP4rev1" "UIDPLUS";
      #
      # server {
      # listen localhost:110;
      # protocol pop3;
      # proxy on;
      # }
      #
      # server {
      # listen localhost:143;
      # protocol imap;
      # proxy on;
      # }
#}

      Hit Ctrl + x <y> <Enter> to save changes

Step 3. Edit fastcgi_param
type: sudo nano /etc/nginx/fastcgi_params
      Ctrl+k Delete everything

      Copy/Past this:
      fastcgi_param   QUERY_STRING            $query_string;
      fastcgi_param   REQUEST_METHOD          $request_method;
      fastcgi_param   CONTENT_TYPE            $content_type;
      fastcgi_param   CONTENT_LENGTH          $content_length;

      fastcgi_param   SCRIPT_FILENAME         $document_root$fastcgi_script_name;
      fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
      fastcgi_param   PATH_INFO               $fastcgi_path_info;
      fastcgi_param   REQUEST_URI             $request_uri;
      fastcgi_param   DOCUMENT_URI            $document_uri;
      fastcgi_param   DOCUMENT_ROOT           $document_root;
      fastcgi_param   SERVER_PROTOCOL         $server_protocol;

      fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
      fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;

      fastcgi_param   REMOTE_ADDR             $remote_addr;
      fastcgi_param   REMOTE_PORT             $remote_port;
      fastcgi_param   SERVER_ADDR             $server_addr;
      fastcgi_param   SERVER_PORT             $server_port;
      fastcgi_param   SERVER_NAME             $server_name;

      fastcgi_param   HTTPS                   $https;

      # PHP only, required if PHP was built with --enable-force-cgi-redirect
      fastcgi_param   REDIRECT_STATUS         200;  

      Delete all white space front of line
      Hit Ctrl + X <y> <Enter> to save changes

Step 4: Edit www.conf
Type: sudo nano /etc/php5/fpm/pool.d/www.conf

      un-commenting: listen.owner
      un-commenting: listen.group  

      Note: Ctrl + w to search through the file

      Hit Ctrl + x <y> <Enter> to save changes

Done...

----------------------------------------------------------------------
Config NGINX to use PHP
----------------------------------------------------------------------
Step 1.
Type: sudo nano /etc/nginx/sites-available/default
     
Add: index.php
 To: index index.html index.htm index.php;

     And: After  the last (location) entry
     
     Copy/Past:
     ## 
     # PHP
     ##
     location ~ [^/].php(/|$) {
            fastcgi_split_path_info ^(.+?.php)(/.*)$;

            if (!-f $document_root$fastcgi_script_name) {
                return 404;
            }

            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
      }

      Hit Ctrl + x <y> <Enter> to save changes

      The above should also have updated sites-enabled/default 
      Type: sudo nano /etc/nginx/sites-enabled/default 
   
Step 2. Create index.php
Type: sudo nano /usr/share/nginx/www/index.php
On RPI-3: sudo nano /var/www/html/index.php

      Copy/past:
      <?php phpinfo(); ?>

      Hit Ctrl + x <y> <Enter> to save changes

Step 3. Reset NGINX Servece
Type: sudo service nginx restart

Step 4. Test Web Server
Launch: Web browser
Type: http://<Rpi IP Address>
      If it worked
Type: http://<Rpi IP Address>/index.php 

Done...    
 
---------------------------------------------------------------------
Config MySQL
---------------------------------------------------------------------

1. Login to MySQL server
   Type: mysql -u root -p
   Type: <password>

Securing MySQL




Accessing MySQL Remotely

 For security reasons, by default access to the MySQL server
 via the main IP address is disabled in the MySQL config. 
 You can connect locally using:

 localhost
 127.0.0.1
 or the internal socket connection on "/var/run/mysqld/mysqld.sock"

1. Remote Access MySQL
   First we need to edit the MySQL config:
   Type: sudo nano /etc/mysql/my.cnf

      Find the configuration line called bind-address.
      By default this is set to 127.0.0.1.
      Set it to "0.0.0.0" and save the file

      Hit Ctrl + x <y> <Enter> to save changes

   Type: sudo service mysql restart

   Done... 

Configure MySQL
1. Add user
   Type: mysql -u root -p
   Type: <password>
   Type: mysql> CREATE USER '<user>'@'localhost' IDENTIFIED BY '<password>';

2. Grant Privilgase
   Type: mysql> GRANT ALL PRIVILEGES ON *.* TO '<user>'@'localhost'
         --> WITH GRANT OPTION; <enter>
   Type: mysql> FLUSH PRIVILEGES;
   Type: mysql> quit

3. New Data Base
   Type: mysql> CREATE DATABASE <db name>;
   Type: mysql> quit

4. Restart MySQL
   Type: Restart MySQL

   Note: Always good to also reboot server after changes...

   Type: sudo service mysql restart

Done...

----------------------------------------------------------------------
Install uWSCI for Python CGI
----------------------------------------------------------------------
Step1.
Type: sudo apt-get install uwsgi
      Do you want to continue [Y/n] Y <Enter>

Type: sudo apt-get install uwsgi-plugin-cgi

Step 2. Check Version
Type: sudo uwsgi --version
      Returns uWSGI version (if it does not then there is a problem)

      uWSGI service commands: 
      sudo service uwsgi stop
      sudo service uwsgi start
      sudo service uwsgi restart
      sudo service uwsgi status

Step 3. Make a simple uWSGI Config .ini
Type: cd /etc/uwsgi/apps-available
Type: sudo nano uwsgi_config.ini <-(your uwsgi config file name)

      Copy/past:
      [uwsgi]
      plugins = cgi
      socket = 127.0.0.1:8000 
      cgi = /usr/share/nginx/www <-(RPI-2 path to your .py directory)
      cgi = /var/www/html <-(RPI-3 path to your .py directory)
      cgi-allowed-ext = .py
      cgi-helper = .py = python

      die-on-term = true

      Hit Ctrl + x <y> <Enter> to save file

Step 3. Link config file in apps-enabled to apps-available
Type: cd ../apps-enabled/
Type: sudo ln -s ../apps-available/uwsgi_config.ini <-(your config file)

Note: linking the file in apps-available will auto update file
      in apps-enabled, so you don't have to mv apps-available
      file to apps-enabled.

Step 4. Restart uWSGI service
      sudo service uwsgi restart
 
Note: be patient: if all went well should return [ok]

Step 5. To see if uWSGI servise id running
      ps aux | grep uwsg

Done...

----------------------------------------------------------------------
Config NGINX to uWSGI for Python .py cgi
----------------------------------------------------------------------
Step 1.
Type: sudo nano /etc/nginx/sites-available/default <-(your site nginx config file name)
 
Add: index.py
 To: index index.html index.htm index.php index.py;      

      And: within (server) section after the last (location) entry

      ##
      # uWSGI
      ##
      location ~ .py$ {
            uwsgi_pass 127.0.0.1:8000;
            include uwsgi_params;
            uwsgi_modifier1 9;
      }

      Ctrl x - y - <Enter> to save

 Note: Hopfully the file in sites-enabled is linked to file in
 sites-available. (if not you need to update sites-enabled file)

Step 2. Make NGINX index.py
Type: sudo nano /usr/share/nginx/www/index.py
On RPI-3: sudo nano /var/www/html/index.py
 
      Copy/Past:
      #!/usr/bin/env python 
      print "Content-type: text/html\n\n" 
      print "<h1>Hello World .py</h1>" 

      Hit Ctrl + x <y> <Enter> to save changes

Type: sudo chmod +x /usr/share/nginx/www/index.py
On RPI-3: sudo chmod +x /var/www/html/index.py 

Note: the .py file has to be exicutabe
Step 3. Restart Uwsgi / NGinx
Type: sudo service uwsgi restart
Note: be patient: if all went well should return [ok]
Type: sudo service nginx restart

Step 4. Test Web Server the .py cgi
Launch: Web browser
Type: http://<Rpi IP Address>
      If it worked
Type: http://<Rpi IP Address>/index.py 

Note: if it does't work sudo reboot and try it again!
Done...
      

^Top


----------------------------------------------------------------------
Install uWSGI Manualy (Note: its a lot easier to do the above install)
----------------------------------------------------------------------
Step 1. Edit NGINX config file
Type: sudo nano /etc/nginx/sites-available/default
      Under * PHP

      Copy/Past
      ##
      # uWSGI
      ##
      location ~ \.py$ {
            include uwsgi_params; 
            uwsgi_modifier1 9;
            uwsgi_pass 127.0.0.1:9000;
      } 

      Hit Ctrl + x <y> <Enter> to save changes 

Step 2. Restart NGinx 
Type: sudo service nginx restart Restarting nginx: nginx. 

Step 3. Install uWSGC 
Type: curl http://uwsgi.it/install | bash -s cgi /home/pi/uwsgi 
Launch: /home/pi/uwsgi
Step 4. Create uWSCI config file 
Type: sudo nano /home/pi/uwsgi_config.ini 
Note: Each request will search for the specified 
      file in /usr/share/nginx/www/ and execute it.

      Copy/Past: 
      [uwsgi]
      plugins = cgi
      threads = 20 
      socket = 127.0.0.1:9000 
      cgi = /usr/share/nginx/www/ <--(your site folder)
      cgi-helper =.py=python 

      Hit Ctrl + x <y> <Enter> to save changes 

Step 5. Create index.py 
Type: sudo nano /usr/share/nginx/www/index.py
On RPI-3: sudo nano /var/www/html/index.py
 

      Copy/Past: 
      #!/usr/bin/env python 
      print "Content-type: text/html\n\n" 
      print "<h1>Hello World .py</h1>" 

      Hit Ctrl + x <y> <Enter> to save changes 

Step 6. Reboot Rpi 
Type: sudo reboot 

Step 7. Start uWSGI
Login:- Password: 
Type: sudo -u www-data ./uwsgi ./uwsgi_config.ini
Type: Ctrl+c To stop uWSGI

Step 8. Test uWSGI
Launch: Web browser
Type: http://<Rpi IP Address>
 If it worked
Type: http://<Rpi IP Address>/index.py 
 
Done...

** Run uWSGI at Boot

Step 1.
Note: The next 3 steps was done in manual install
Type: sudo nano /etc/nginx/sites-available/<Website Conf File> (default)

This needs to be placed inside the “server” block of the 
configuration, for example right after one of the 
existing “location” sections.
Copy/Past:

     location ~ \.py$ {
            uwsgi_pass 127.0.0.1:9000;
            include uwsgi_params;
            uwsgi_modifier1 9;
     }

     Hit Ctrl + x <y> <Enter> to save changes 

Type: sudo mv /etc/nginx/sites-available/ <Website Conf File>  /etc/nginx/sites-enabled/

Type: sudo nano /usr/share/nginx/www/index.py
On RPI-3: sudo nano /var/www/html/index.py

 
Copy/Past:

     #!/usr/bin/env python 
     print "Content-type: text/html\n\n"
     print "<h1>Hello World</h1>"

     Hit Ctrl + x <y> <Enter> to save changes

Type: sudo /etc/init.d/nginx start

Install uWSGI
Type: cd
Type: curl http://uwsgi.it/install | bash -s cgi /home/pi/uwsgi
Type: sudo mv /home/pi/uwsgi /usr/local/bin

Install uWSGI
Type: sudo nano /etc/uwsgi.ini 
Copy/Past: 
  [uwsgi] 
  plugins = cgi 
  socket = 127.0.0.1:9000 
  cgi = <Your website folder> example: /usr/share/nginx/www 
  cgi-allowed-ext = .py 
  cgi-helper = .py=python 

  Hit Ctrl + x <y> <Enter> to save changes 

Type: sudo nano /etc/init.d/uwsgi 
Copy/Past: 

#!/bin/sh
# BEGIN INIT INFO
# Provides: uwsgi
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the uwsgi cgi socket
# Description: starts uwsgi using start-stop-daemon
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/uwsgi
NAME=uwsgi
DESC=uwsgi
DAEMON_OPTS=/etc/uwsgi.ini

test -x $DAEMON || exit 0

set -e

. /lib/lsb/init-functions

case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--make-pidfile --chuid www-data --background \
--exec $DAEMON -- $DAEMON_OPTS || true
echo "$NAME."
;;

stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON || true
echo "$NAME."
;;

restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON || true
sleep 1
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--chuid www-data --background \
--exec $DAEMON -- $DAEMON_OPTS || true
echo "$NAME."
;;

status)
status_of_proc -p /var/run/$NAME.pid "$DAEMON" uwsgi && exit 0 || exit $?
;;
*)
echo "Usage: $NAME {start|stop|restart|status}" >&2
exit 1
;;
esac

exit 0

Hit Ctrl + x <y> <Enter> to save changes 

Type: sudo nano /etc/rc.local 
Copy/Past: 

   #Start uWSGI Python 
   (sleep 5;sudo /etc/init.d/uwsgi start)& 

Hit Ctrl + x <y> <Enter> to save changes 

Type: sudo nano /var/run/uwsgi.pid 

Enter: # 

Hit Ctrl + x <y> <Enter> to save changes 

Type: sudo chmod +x /etc/init.d/uwsgi 
Type: sudo /etc/init.d/uwsgi start or stop or status 

Launch Browser Type: http://{your pi’s ip address}/index.py 

Done... 

^Top


Notes:

Table Content
1. Run multiple/virtual Websites on NGinx
2. Add logging to NGinx
3. Add aditional websites to NGinx
4. Create .htpasswp file for Nginx
5. Login Basic Authentication on Nginx
6. Logout Basic Authentication Nginx
7. Get Basic Authentication userName / Password Nginx PHP
8. Restricting File / Directory access Nginx
6. Whitelisting listing file extensions on Nginx



1. Run multiple/virtual Websites on NGinx
   Type: sudo nano /etc/nginx/sites-available/default
   Right under:
   server {
          Add: listen 80; # This sets the listing port
          Add: #server_name $domain_name; # This Sets Domain Name
   
   Hit Ctrl + x <y> <Enter> to save changes

   Done...

2. Add logging to NGinx
   Type: sudo mkdir -p /usr/share/nginx/www/logs
   Type: sudo nano /etc/nginx/sites-available/default
   server {
          listen 80;
          #server_name $domain_name;
          root /usr/share/nginx/www/;
          index index.html index.htm index.php;
          
          Add: access_log /usr/share/nginx/www/logs/access.log;
          Add: error_log /usr/share/nginx/www/logs/error.log;
   
   Hit Ctrl + x <y> <Enter> to save changes
   Done...

3. Add aditional websites to NGinx
   Type: sudo mkdir -p /usr/share/nginx/<new site directory>
   Type: sudo mkdir -p /usr/share/nginx/<new site directory>/logs
   Type: 
   Type: sudo cp /etc/nginx/sites-available/default  /etc/nginx/sites-available/<new site name>
   
   Edit 
   Type: sudo nano /etc/nginx/sites-available/<new site name>
   server {
          listen <new site port>;
          #server_name $domain_name;
          root /usr/share/nginx/<new site directory>/;
          index index.html index.htm index.php;
 
          access_log /usr/share/nginx/<new site directory>/logs/access.log;
          error_log /usr/share/nginx/<new site directory>/logs/error.log;

   Hit Ctrl + x <y> <Enter> to save changes

   Type: mv /etc/nginx/sites-available/<new site name> /etc/nginx/sites-enabled/
    
   Create index.html
   Type: sudo nano /usr/share/nginx/<new site directory>/index.html
   Copy/Past:
      Welcome...

   Hit Ctrl + x <y> <Enter> to save changes

   Restart NGinx
   Type: sudo service nginx <stop / start / restart> 

   Done...

4. Create .htpasswp file for Nginx
   Type: sudo echo -e "<user>:`perl -le 'print crypt("<password>","<key>")'`"
   Returns: <user>:<password>
   Type: sudo nano /usr/share/nginx/<your directory>/.htpasswd
   Copy/Past: <user>:<password>

   Hit Ctrl + X <y> <Enter> to save changes

   Done...

5. Login Basic Authentication on Nginx
   Type: sudo nano /etc/nginx/sites-available/<your site config file>
   Copy/Past: under location / {

       auth_basic "Restricted";
       auth_basic_user_file /usr/share/nginx/<your website>/.htpasswd;

       fastcgi_param AUTH_USER $remote_user;
       fastcgi_param REMOTE_USER $remote_user;

       # First attempt to serve request as file, then
       # as directory, then fall back to displaying a 404.
       # try_files $uri $uri/ /index.php;
       # Uncomment to enable naxsi on this location
       # include /etc/nginx/naxsi.rules
       index index.php index.html index.htm;
   
   Hit Ctrl + x <y> <Enter> to save changes

   Type: sudo cp /etc/nginx/sites-available/<your site config file> /etc/nginx/sites-enabled/
   Type: sudo service nginx restart

   Done...

6. Logout Basic Authentication Nginx
   Copy/Past: This to your global .js file

   function LogOut() {
        
         session_destroy();
         session_unset($_SESSION['session_id']);
         header("Location: /auth/", TRUE, 301);
 
         //Redirect page
         //top.window.location.replace('http://'+window.location.hostname$
         top.window.location.replace('http://google.com');

   return false;

   } 

   LogOut();

   Done...

7. Get Basic Authentication userName / Password Nginx PHP
   Copy/Past:
   
         $userName = $_SERVER['PHP_AUTH_USER'];
         $userPassword = $_SERVER['PHP_AUTH_PW'];

   Done...
  
8. Restricting File / Directory access Nginx
   Type: sudo nano /etc/nginx/sites-available/<your website config file>
   Copy/Past:

   // Restrict file access
   location ~ /(\.|config.php|connectdb.php|install.php) {
           deny all;
           return 404;
   }

   // Restrict Directory access
   location ~ /logs {
           deny all;
           return 404;
   }

   Hit Ctrl + x <y> <Enter> to save changes

   Type: mv /etc/nginx/sites-available/<your website config file> /etc/nginx/sites-enabled/ 
 
   Done...

5. Whitelisting listing file extentions on Nginx 
   Type: sudo nano /etc/nginx/nginx.conf 



Install JAVA

1.Install java
  Type: sudo apt-get update
  Type: sudo apt-get install openjdk-6-jdk 
    or: sudo apt-get install oracle-java7-jdk

Note: You can load both versions an then target the version you
      when you compile.

   Done...

1. Check jave version
   Type: java -version

1. Creat jave App
   Type: sudo nano <filename>.java
         <your source code>

   Done...

2. Comple java App
   Type: javac <file name>.java
   Type: javac -target 6 server.java (Compile in java version 6)

   Done...

1. Run java App
   Type: java server

Useful Commands

1. See who owns the directory
   Type: ls -la example1
    or: ls -la /example/example1

2. Take ownership of directory
   Type: sudo chown -R joe:group example1
     or: sudo chown -R joe:group /example/example1

3. Change the file owner
   Type: sudo chown joe example.txt
     or: sudo chown joe /example/example.txt

4. Change the file owner and group
   Type: sudo chown joe:group example.txt

5. Add user to group
   Type: sudo adduser joe group

6. Delete user from group
   Type: sudo deluser joe group

7. Find tty owner 
   Type: ls -l /dev/ttyAMA0

8. Installing pip
   Type: sudo apt-get install python-pip

4. Know the number of CPU on your system 
   Type: grep processor /proc/cpuinfo | wc -l

^Top


Conclusion:

NGinx is a very versatile fast web-server with lots of options.
^Top


Reference Links:

1. Running CGI scripts on uWSGI
2. Setting up Nginx and uWSGI for CGI scripting
3. Running Python CGI Scripts on the Raspberry Pi
4. Run uWSGI Python in the background (as a service) on boot
5. How To Host Multiple Websites Securely With Nginx

Advertisements