Commit 23c3a613 authored by contabo-server's avatar contabo-server
Browse files

fixed nginx conf and readme

parent 9aba32a4
......@@ -3,7 +3,6 @@
Eine Tolle Webapp zum Austausch von Dateien
# Installation and Usage
`git clone https://gitlab.cs.fau.de/ib49uquh/chiefsend.git`
......@@ -12,58 +11,21 @@ Eine Tolle Webapp zum Austausch von Dateien
`docker-compose up`
## Traditional Install
## Traditional Install
```
git clone
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
sudo vim ./sites-available/chiefsend.conf <--- paste the config in there
sudo ln -ls ./sites-available/chiefsend.conf ./sites-enabled/chiefsend.conf
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 {
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
Optional copy the services into /etc/systemd/system/ and enable/start them
access_log /var/log/nginx/chiefsend_access.log;
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;
}
}
**enable services and stuff**
```
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');
\ No newline at end of file
console.log('Hallo');
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 1000M;
proxy_buffer_size 1024k;
proxy_buffers 4 1024k;
proxy_busy_buffers_size 1024k;
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 30d;
}
location /img {
alias /home/chief/chiefsend/app/static/img;
expires 30d;
}
location /icons {
alias /home/chief/chiefsend/app/static/icons;
expires 30d;
}
location /js {
alias /home/chief/chiefsend/app/static/js;
expires 30d;
}
location /css {
alias /home/chief/chiefsend/app/static/css;
expires 30d;
}
# regex
#location ~* ^/(js|css|icons|img)/ {
#alias /home/chief/chiefsend/app/;
#expires 1y;
#}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment