In case your application requires Nginx to rewrite some URLs, in this article you'll find how to make it work. As an example, we'll add a simple rewrite rule taken from Nginx documentation to a site with domain

Take a quick look first to the basics about fine-tuning your applications with Moss in case you haven't done it yet.

Nginx configuration

  1. Log into your server as user moss: ssh moss@<server-ip> 
  2. Using sudo and your favorite text editor, add as many rewrite rules as you need to file /etc/openresty/ E.g:
rewrite ^/users/(.*)$ /show?user=$1? last;

Provision your website

  1. Log into Moss
  2. Head to the details of 
  3. Click the 'Provision' button and wait until Moss finishes the process
Did this answer your question?