Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chiefs
ChiefSend
Commits
23c3a613
Commit
23c3a613
authored
Jan 19, 2021
by
contabo-server
Browse files
fixed nginx conf and readme
parent
9aba32a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
23c3a613
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
Eine Tolle Webapp zum Austausch von Dateien
Eine Tolle Webapp zum Austausch von Dateien
# Installation and Usage
# Installation and Usage
`git clone https://gitlab.cs.fau.de/ib49uquh/chiefsend.git`
`git clone https://gitlab.cs.fau.de/ib49uquh/chiefsend.git`
...
@@ -12,58 +11,21 @@ Eine Tolle Webapp zum Austausch von Dateien
...
@@ -12,58 +11,21 @@ Eine Tolle Webapp zum Austausch von Dateien
`docker-compose up`
`docker-compose up`
## Traditional Install
## Traditional Install
```
```
git clone
git clone
sudo apt update
sudo apt update
sudo apt install nginx redis-server certbox
sudo apt install nginx redis-server certbot
sudo systemctl stop nginx
sudo certbot certonly -d <DOMAIN>
sudo systemctl start nginx
sudo cp ./chiefsend.conf /etc/nginx/sites-available/
cd /etc/nginx
cd /etc/nginx
sudo vim ./sites-available/chiefsend.conf <--- paste the config in there
sudo ln -ls ./sites-available/chiefsend.conf ./sites-enabled/chiefsend.conf
sudo ln -ls ./sites-available/chiefsend.conf ./sites-enabled/chiefsend.conf
sudo rm -f ./sites-enabled/default
sudo rm -f ./sites-enabled/default
sudo certbot certonly -d send.chief.zone
**enable services and stuff**
```
### nginx config example:
```
server {
listen 80;
listen [::]:80;
server_name send.chief.zone;
return 301 https://$server_name$request_uri;
}
server {
Optional copy the services into /etc/systemd/system/ and enable/start them
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name send.chief.zone;
ssl_certificate /etc/letsencrypt/live/send.chief.zone/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/send.chief.zone/privkey.pem; # managed by Certbot
access_log /var/log/nginx/chiefsend_access.log;
**enable services and stuff**
if ($http_host !~ "^send.chief.zone"){
rewrite ^(.*)$ $scheme://send.chief.zone/$1 redirect;
}
client_max_body_size 500M;
proxy_buffer_size 1024k;
proxy_buffers 4 1024k;
proxy_busy_buffers_size 1024k;
location / {
include proxy_params;
proxy_pass http://localhost:5000;
}
location /static {
alias /home/chief/chiefsend/app/static;
expires 1d;
}
}
```
```
app/static/service-worker.js
View file @
23c3a613
importScripts
(
'
https://storage.googleapis.com/workbox-cdn/releases/6.0.2/workbox-sw.js
'
);
//
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.0.2/workbox-sw.js');
console
.
log
(
'
Hallo
'
);
console
.
log
(
'
Hallo
'
);
\ No newline at end of file
chiefsend.conf
0 → 100644
View file @
23c3a613
server
{
listen
80
;
listen
[::]:
80
;
server_name
send
.
chief
.
zone
;
return
301
https
://$
server_name
$
request_uri
;
}
server
{
listen
443
ssl
http2
;
listen
[::]:
443
ssl
http2
;
server_name
send
.
chief
.
zone
;
ssl_certificate
/
etc
/
letsencrypt
/
live
/
chief
.
zone
/
fullchain
.
pem
;
# managed by Certbot
ssl_certificate_key
/
etc
/
letsencrypt
/
live
/
chief
.
zone
/
privkey
.
pem
;
# managed by Certbot
access_log
/
var
/
log
/
nginx
/
chiefsend
/
acc
.
log
;
error_log
/
var
/
log
/
nginx
/
cheifsend
/
err
.
log
if
($
http_host
!~
"^send.chief.zone"
){
rewrite
^(.*)$ $
scheme
://
send
.
chief
.
zone
/$
1
redirect
;
}
client_max_body_size
1000
M
;
proxy_buffer_size
1024
k
;
proxy_buffers
4
1024
k
;
proxy_busy_buffers_size
1024
k
;
gzip
on
;
gzip_types
text
/
plain
text
/
css
text
/
js
text
/
xml
text
/
javascript
application
/
javascript
application
/
json
application
/
xml
application
/
rss
+
xml
image
/
svg
+
xml
;
location
/ {
include
proxy_params
;
proxy_pass
http
://
localhost
:
5000
;
}
location
/
static
{
alias
/
home
/
chief
/
chiefsend
/
app
/
static
;
expires
30
d
;
}
location
/
img
{
alias
/
home
/
chief
/
chiefsend
/
app
/
static
/
img
;
expires
30
d
;
}
location
/
icons
{
alias
/
home
/
chief
/
chiefsend
/
app
/
static
/
icons
;
expires
30
d
;
}
location
/
js
{
alias
/
home
/
chief
/
chiefsend
/
app
/
static
/
js
;
expires
30
d
;
}
location
/
css
{
alias
/
home
/
chief
/
chiefsend
/
app
/
static
/
css
;
expires
30
d
;
}
# regex
#location ~* ^/(js|css|icons|img)/ {
#alias /home/chief/chiefsend/app/;
#expires 1y;
#}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment