FaxStore
Now that required content is installed and files have been uploaded from steps one and two, they can now be configured. Things like Nginx configuration, SSL certificate generation, and the configuration file can now be modified.
As FaxStore runs as a node application Nginx can be used as a reverse proxy to route web-traffic to the FaxStore application safely and securely. Configure Nginx by completing the following steps.
Using the SFTP application navigate to the below directory and open the file (default) in a text editor.
For more advanced users that know Nginx, it's recommended to create separate configuration files per domain.
/etc/nginx/sites-available/defaultUsing the below as a template, remove the example content (usually all content) from the existing default file and replace it with the below Be sure to update the domain accordingly and FaxStore port if another one is planned to be used.
server {
server_name DOMAIN_HERE; # Change domain to your domain (eg; example.com)
location / {
proxy_pass http://localhost:3000; # Change the port if desired.
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
}
error_page 502 /502.html;
location = /502.html {
root /home/faxstore/public;
}
}Once changes have been made, save the file and restart Nginx
service nginx restartIf Nginx fails to restart or presents errors try the Nginx test command nginx -t to see whether there's a syntax issue.
FaxStore should be secured with SSL using Certbot which is the same method typically used in many online applications.
sudo certbot --nginx -d example.comReplace the domain with the domain or subdomain configured for FaxStore.
Open the FaxStore configuration file (located at /home/faxstore/config.json) and update it according to the desired environment settings, be sure to use the same domain and port set in the above steps. Ensure the protocol is https in the domain field.
Payment, SendGrid, and OAuth tokens and credentials are covered in steps four and five.
Step three has been completed