2.11. When selecting your web server, choose Other [3] to run static files using NGINX.

Step 8: Choose either Web or Application Server Type.

Select a particular Web or Application Server to be used for the WSC Application Server running.

	1. Apache HTTP Server
	2. Java Application Server (Apache Tomcat, Oracle WebLogic Server, Oracle GlassFish Server, etc.)
	3. Other

Input the number from 1 to 3:3

Due to technical limitations, WSC Dialog plugin for CKEditor 4 is not available for setup on Nginx. If it is a requirement for you to use this plugin, please consider setting it up on either Apache HTTP Server or Apache Tomcat.

If you want to use NGINX as a web server, perform the following steps:

  1. Set up NGINX.
  2. Create a wscservice configuration file with bindings to WebSpellChecker static files and add the necessary Access-Control-Allow-Origin headers.
  3. Create a symlink for the wscservice virtual directory.
  4. Configure NGINX to act as a reverse proxy to avoid exposing the 2880 port of AppServer. Check in the config sample below or visit NGINX reverse proxy on Ubuntu for more details.

Step 1. Install NGINX.

sudo apt-get update
sudo apt-get  install nginx

Step 2. Customize the firewall.

sudo ufw allow  'Nginx Full'

Step 3. Check the status of NGINX web server.

systemctl status nginx

Step 4. Create and customize 'server blocks'.

sudo cd /etc/nginx/sites-available/
sudo cp default wscservice
sudo nano wscservice

Here is an example of wscservice configuration file for NGINX.

# 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 wscservice;

	# bindings of static files
	location /wscservice/ {
		alias /opt/WSC/WebComponents/WebInterface/;
		autoindex on;
		index  index.html index.htm;

	location /wscservice/samples/ {
		alias /opt/WSC/WebComponents/Samples/;
		autoindex on;
		index  index.html index.htm;
	location /wscservice/wscbundle/ {
		alias /opt/WSC/WebComponents/WebInterface/wscbundle/;
		autoindex on;
		add_header Access-Control-Allow-Origin '*';

	# reverse proxy for proxying requests to AppServer
	location /wscservice/api {
    # location /wscservice/api/ with a slash for WebSpellChecker versions only
    proxy_pass http://your_host:2880;


Step 5. Create symlink for the 'wscservice' file.

ln -s  /etc/nginx/sites-available/wscservice /etc/nginx/sites-enabled/wscservice

Step 6. Restart NGINX.

sudo systemctl restart nginx

Step 7. NGINX troubleshooting if the restart fails. Probably the default NGINX config already uses the 80/443 port or you added an extra curly brace.

sudo nginx -t

  • No labels