diff --git a/README.md b/README.md index af44195..57b49f6 100644 --- a/README.md +++ b/README.md @@ -308,6 +308,30 @@ You have three options: - move or symlink the `synapse-admin` into your vhosts root dir - open the url of the vhost in your browser +**Example config for nginx:** + +Place it in `/etc/nginx/conf.d/synapse-admin.conf` (don't forget to replace server_name and root) +```conf +server { + listen 80; + listen [::]:80; + server_name example.com; # REPLACE with your domain + root /var/www/synapse-admin; # REPLACE with path where you extracted synapse admin + index index.html; + location / { + try_files $uri $uri/ /index.html; + } + location ~* \.(?:css|js|jpg|jpeg|gif|png|svg|ico|woff|woff2|ttf|eot|webp)$ { + expires 30d; # Set caching for static assets + add_header Cache-Control "public"; + } + + gzip on; + gzip_types text/plain application/javascript application/json text/css text/xml application/xml+rss; + gzip_min_length 1000; +} +``` + #### Steps for 2) - make sure you have installed the following: git, yarn, nodejs