Installing The Nginx Web Server:
written by EON Mar 10, 2012 (Estimated Time: 5 mins)
EON 1.0 and higher no longer embeds Apache or Perl. If a web server is needed, there are 3 web server options (Apache, Lighttpd and Nignx). The web servers can be installed together but will require configuration edits to run simultaneously because the default settings are configured for port 80 and 443.
Let's show how to install and run the Nginx Web Server. With this EON release, 2 programs were introduced to simplify installs. One is the internet package installer, "rail" and the other "emp" is a program to start/stop/restart all the various programs.
Pre-requisite(s): The Binary Kit must be installed.
This assumes Internet connectivity is working and the binary kit has already been installed. So, let's install the Nginx Web Server.
rail install nginxinstall nginx ... found local /usr/local/.store/nginx-1.1.12.tgz (md5 pass: a0e625e0864dbbefc370ab341a8216fd) installing: /usr/local/.store/nginx-1.1.12.tgz ... doneThat's it, Nginx 1.4.30 is installed. Now let's start the Nginx web server, with "emp". Then, point your favorite browser to the IP address of your EON Server and you should see
emp nginx start nginx: startLet's view the running Nginx processes.
emp nginx show 1157 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 1158 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 1159 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.confTo see other options for simply run "emp". The highlight below says, for apache, lighttpd, and nginx the options start, stop, restart and show are possible.
empusage: /usr/bin/emp name [ action ] afp [ start | stop ] apache | light | nginx [ start | stop | restart | show ] bind | dhcpd [ start | stop | restart ] daap | mtomb [ start | stop ] ndd [ start ] nfs [ start | stop | restart ] hotplug | powerd [ start | stop ] java [ start | show ] nscd | ntpd [ start | stop | restart ] osx [ start | stop ] postfix [ start | stop ] rsyncd [ start | stop | restart ] sabnzb | sickbeard | couchpotato [ start | stop ] transmission [ start | stop ] zswap | zdump [ start | stop | show ]The Nginx web server is pre-configured with a self-signed CA certificate. You can (and should) generate your own unique self-signed CA cert using "certgen.sh"
certgen.shEON Storage self signed CA certificate generatorusage: /usr/local/bin/certgen.sh [ a | l | n ] a = apache | l = lighttpd | n = nginxTo generate a certificate for Nginx. The highlight shows the pre-configured certificate, already exist.
certgen.sh nEON Storage self signed CA certificate generator [nginx] nginx certificate/key: exist already /usr/local/nginx/conf/cert.pem /usr/local/nginx/conf/cert.key exiting: NO changes madeTo remove the pre-configured certificate and generate a unique certificate.
rm /usr/local/nginx/conf/cert.pemrm /usr/local/nginx/conf/cert.keycertgen.sh nConfiguration file location(s):
/usr/local/nginx/conf/nginx.confLog file location(s):
/usr/local/nginx/logs