mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-21 15:25:22 +03:00
add nginx config example
This commit is contained in:
parent
e394a7e186
commit
ca2decda3a
1 changed files with 24 additions and 0 deletions
24
README.md
24
README.md
|
@ -308,6 +308,30 @@ You have three options:
|
||||||
- move or symlink the `synapse-admin` into your vhosts root dir
|
- move or symlink the `synapse-admin` into your vhosts root dir
|
||||||
- open the url of the vhost in your browser
|
- 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)
|
#### Steps for 2)
|
||||||
|
|
||||||
- make sure you have installed the following: git, yarn, nodejs
|
- make sure you have installed the following: git, yarn, nodejs
|
||||||
|
|
Loading…
Reference in a new issue