You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Step 1. Install Nginx

$ sudo apt-get update
$ sudo apt-get install nginx

Step 2. Adjust the Firewall

$sudo ufw allow 'NginxHTTP'

Step 3. Check your Web Server

$ systemctl status nginx

Step 4. Create and customize 'server blocks'

$ sudo cd /etc/nginx/sites-available/
$ sudo cp default spellcheck
$ sudo nano spellcheck

Here is an example of spellcheck configuration file for Nginx.

spellcheck
# Default server configuration
#
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	# SSL configuration
	#
	# listen 443 ssl default_server;
	# listen [::]:443 ssl default_server;
	#
	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332

	server_name _;

	location /spellcheck/ {
            alias /opt/WSC/WebComponents/WebInterface/;
            autoindex on;
            index  index.html index.htm;
            
			location /spellcheck/samples/ {
                    alias /opt/WSC/WebComponents/Samples/;
                    autoindex on;
                    index  index.html index.htm;
            		}
			location /spellcheck/wscbundle/ {
                    alias /opt/WSC/WebComponents/WebInterface/wscbundle/;
                    autoindex on;
            		}
			}	
	}

Step 5. Create symlink for the 'spellcheck' file

$ ln -s /etc/nginx/sites-available/spellcheck /etc/nginx/sites-enabled/spellcheck

Step 6. Restart Nginx

$ sudo systemctl restart nginx

  • No labels