mirror of https://github.com/Lissy93/dashy.git
📝 Server config examples for Firebase, Caddy and Apache
This commit is contained in:
parent
d35bd9457b
commit
68640afc87
|
@ -617,6 +617,8 @@ Note, that if you choose not to use `server.js` to serve up the app, you will lo
|
||||||
Example Configs
|
Example Configs
|
||||||
- [NGINX](#nginx)
|
- [NGINX](#nginx)
|
||||||
- [Apache](#apache)
|
- [Apache](#apache)
|
||||||
|
- [Caddy](#caddy)
|
||||||
|
- [Firebase](#firebase-hosting)
|
||||||
- [cPanel](#cpanel)
|
- [cPanel](#cpanel)
|
||||||
|
|
||||||
### NGINX
|
### NGINX
|
||||||
|
@ -638,6 +640,9 @@ server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To use HTML5 history mode (`appConfig.routingMode: history`), replace the inside of the location block with: `try_files $uri $uri/ /index.html;`.
|
||||||
|
|
||||||
Then upload the build contents of Dashy's dist directory to that location.
|
Then upload the build contents of Dashy's dist directory to that location.
|
||||||
For example: `scp -r ./dist/* [username]@[server_ip]:/var/www/dashy/html`
|
For example: `scp -r ./dist/* [username]@[server_ip]:/var/www/dashy/html`
|
||||||
|
|
||||||
|
@ -652,6 +657,15 @@ In your Apache config, `/etc/apche2/apache2.conf` add:
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /index.html [L]
|
||||||
|
</IfModule>
|
||||||
```
|
```
|
||||||
|
|
||||||
Add a `.htaccess` file within `/var/www/html/dashy/.htaccess`, and add:
|
Add a `.htaccess` file within `/var/www/html/dashy/.htaccess`, and add:
|
||||||
|
@ -664,6 +678,39 @@ RewriteRule ^ index.html [QSA,L]
|
||||||
|
|
||||||
Then restart Apache, with `sudo systemctl restart apache2`
|
Then restart Apache, with `sudo systemctl restart apache2`
|
||||||
|
|
||||||
|
### Caddy
|
||||||
|
|
||||||
|
Caddy v2
|
||||||
|
```
|
||||||
|
try_files {path} /
|
||||||
|
```
|
||||||
|
|
||||||
|
Caddy v1
|
||||||
|
```
|
||||||
|
rewrite {
|
||||||
|
regexp .*
|
||||||
|
to {path} /
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Firebase Hosting
|
||||||
|
|
||||||
|
Create a file names `firebase.json`, and populate it with something similar to:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"hosting": {
|
||||||
|
"public": "dist",
|
||||||
|
"rewrites": [
|
||||||
|
{
|
||||||
|
"source": "**",
|
||||||
|
"destination": "/index.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### cPanel
|
### cPanel
|
||||||
1. Login to your WHM
|
1. Login to your WHM
|
||||||
2. Open 'Feature Manager' on the left sidebar
|
2. Open 'Feature Manager' on the left sidebar
|
||||||
|
@ -704,4 +751,4 @@ You can push your build image, by running: `docker push ghcr.io/OWNER/IMAGE_NAME
|
||||||
|
|
||||||
**[⬆️ Back to Top](#management)**
|
**[⬆️ Back to Top](#management)**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in New Issue