23
loading...
This website collects cookies to deliver better user experience
wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod 0700 ./install.sh
sh ./install.sh --bundle LEMP
--bundle LEMP
because I prefer to install Nginx over Apache. Whatever the choice is up to you but overall Nginx is way faster than Apache because of its simple configuration and event-driven, and you need those (the webserver) anyway to let it handle the heavy lifting of managing your app processes. https://<Your IP address>:10000
to open Webmin portal (yes, Virtualmin is part of Webmin). server {
server_name example.com;
listen 1.2.3.4;
listen 1.2.3.4:443 ssl;
root /home/username/public_html;
index index.html index.htm index.php;
access_log /var/log/virtualmin/example.com_access_log;
error_log /var/log/virtualmin/example.com_error_log;
location ~ \.php(/|$) {
try_files $uri =404;
fastcgi_pass localhost:8001;
}
ssl_certificate /home/username/ssl.combined;
ssl_certificate_key /home/username/ssl.key;
}
example
, the server IP to listen with 1.2.3.4
, where the base directory is /home/username/public_html
and so on. What essential in NginX is that by default it only serves as a static web server. To make most of the features it gives you need to understand additional configs, like the fastcgi_pass
to enable dynamic processing on .php
files.proxy_pass
but it won't handle the app startup and crashes for us. Luckily we have a better option: Phusion Passenger.root /home/username/public_html/public;
passenger_enabled on;
# for easier debugging!
passenger_friendly_error_pages on;
app.js
or passenger_wsgi.py
) in the parent root directory (public_html
) and boot the relevant process (of course, you need to already do have Node.js or whatever programming language you want to run with and already installing node_modules
or whatever code dependencies your app need beforehand).total used free shared buff/cache available
Mem: 1817 1327 67 72 421 268
Swap: 0 0 0
23