Basic server setup
Serve your own project using nginx
Overview
This guide will help you set up a basic server using nginx to run your project with CheerpX. CheerpX requires SharedArrayBuffer, which itself requires the site to be cross-origin isolated. This means that the server must set the appropriate headers.
Configuration Steps
1. Prepare Your Nginx Configuration
Create a file named nginx.conf
and add the following configuration:
This is a basic nginx configuration that allows CheerpX to run.
2. Important notes
- This setup is suitable for a development environment on
localhost
, which is an exception to the usual cross-origin isolation requirements. - For production environments, it is important to use HTTPS to ensure cross-origin isolation and overall securitity, since cross-origin isolation cannot be achieved without HTTPS (with the exception of localhost).
3. Run Nginx
Use the following command to start nginx with your configuration: