Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5ab91ec250
64
MUOR/MUOR/configs/muor.conf
Normal file
64
MUOR/MUOR/configs/muor.conf
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream django {
|
||||||
|
server localhost:8080;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
if ($host = randomsec.projektstudencki.pl) {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
listen 80 reuseport;
|
||||||
|
server_name randomsec.projektstudencki.pl
|
||||||
|
charset utf-8;
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
|
# configuration of the server
|
||||||
|
server {
|
||||||
|
# the port your site will be served on
|
||||||
|
listen 443 ssl http2 reuseport;
|
||||||
|
# the domain name it will serve for
|
||||||
|
server_name randomsec.projektstudencki.pl
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
# max upload size
|
||||||
|
client_max_body_size 75M; # adjust to taste
|
||||||
|
|
||||||
|
# location /static {
|
||||||
|
# alias /path/to/static; #TODO add path
|
||||||
|
# expires 30d;
|
||||||
|
# access_log off;
|
||||||
|
# add_header Pragma public;
|
||||||
|
# add_header Cache-Control "public";
|
||||||
|
# }
|
||||||
|
|
||||||
|
error_page 500 502 503 504 404 403 /error.html;
|
||||||
|
|
||||||
|
location = /error.html {
|
||||||
|
add_header Content-Type text/html;
|
||||||
|
return 200 '<h1>Loading your instance...</h1><meta http-equiv="refresh" content="1; URL=http://randomsec.projektstudencki.pl/" />';
|
||||||
|
}
|
||||||
|
|
||||||
|
location /logout/ {
|
||||||
|
proxy_pass http://django;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Finally, send all non-media requests to the Django server.
|
||||||
|
location / {
|
||||||
|
if ($cookie_sessionid = ""){
|
||||||
|
proxy_pass http://django; # TODO prolly change that to uwsgi_pass
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/randomsec.projektstudencki.pl/fullchain.pem; # managed by Certbot
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/randomsec.projektstudencki.pl/privkey.pem; # managed by Certbot
|
||||||
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||||
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
# add_header Strict-Transport-Security max-age=31536000;
|
||||||
|
}
|
@ -38,11 +38,11 @@ server {
|
|||||||
# add_header Cache-Control "public";
|
# add_header Cache-Control "public";
|
||||||
# }
|
# }
|
||||||
|
|
||||||
error_page 500 502 503 504 404 /error.html;
|
error_page 500 502 503 504 404 403 /error.html;
|
||||||
|
|
||||||
location = /error.html {
|
location = /error.html {
|
||||||
add_header Content-Type text/html;
|
add_header Content-Type text/html;
|
||||||
return 200 '<meta http-equiv="refresh" content="1; URL=http://randomsec.projektstudencki.pl/" />';
|
return 200 '<h1>Loading your instance...</h1><meta http-equiv="refresh" content="1; URL=http://randomsec.projektstudencki.pl/" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
location /logout/ {
|
location /logout/ {
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
worker_processes 1;
|
user www-data;
|
||||||
|
worker_processes auto;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
include /etc/nginx/modules-enabled/*.conf;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 768;
|
||||||
|
# multi_accept on;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
|
|
||||||
##
|
##
|
||||||
# Basic Settings
|
# Basic Settings
|
||||||
##
|
##
|
||||||
@ -27,8 +30,8 @@ http {
|
|||||||
# SSL Settings
|
# SSL Settings
|
||||||
##
|
##
|
||||||
|
|
||||||
ssl_protocols TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
|
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
|
||||||
ssl_prefer_server_ciphers on;
|
# ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
##
|
##
|
||||||
# Logging Settings
|
# Logging Settings
|
||||||
|
@ -126,7 +126,7 @@ STATICFILES_DIRS = (
|
|||||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||||
|
|
||||||
|
|
||||||
LOGIN_REDIRECT_URL = 'home'
|
LOGIN_REDIRECT_URL = 'loader'
|
||||||
LOGOUT_REDIRECT_URL = 'home'
|
LOGOUT_REDIRECT_URL = 'home'
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
|
@ -25,9 +25,8 @@ urlpatterns = [
|
|||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('', include('django.contrib.auth.urls')),
|
path('', include('django.contrib.auth.urls')),
|
||||||
path('signup/', SignUpView.as_view(), name='signup'),
|
path('signup/', SignUpView.as_view(), name='signup'),
|
||||||
path('welcome/', TemplateView.as_view(template_name='home.html'),
|
path('loader/', TemplateView.as_view(template_name='loader.html'), name='loader'),
|
||||||
name='home'),
|
path('welcome/', TemplateView.as_view(template_name='home.html'), name='home'),
|
||||||
path('favicon.ico', RedirectView.as_view(
|
path('favicon.ico', RedirectView.as_view(url=staticfiles_storage.url('images/favicon.ico'))),
|
||||||
url=staticfiles_storage.url('images/favicon.ico'))),
|
|
||||||
path('', views.home, name='home')
|
path('', views.home, name='home')
|
||||||
]
|
]
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
from django.contrib.auth import logout
|
|
||||||
from django.contrib.auth.forms import UserCreationForm
|
from django.contrib.auth.forms import UserCreationForm
|
||||||
from django.http import JsonResponse
|
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
|
BIN
MUOR/db.sqlite3
BIN
MUOR/db.sqlite3
Binary file not shown.
@ -2,8 +2,8 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"
|
||||||
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>{% block title %}MultiUserOpenRefine{% endblock %}</title>
|
<title>{% block title %}MultiUserOpenRefine{% endblock %}</title>
|
||||||
</head>
|
</head>
|
||||||
@ -25,5 +25,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
||||||
|
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
|
||||||
|
integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
|
||||||
|
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
13
MUOR/templates/loader.html
Normal file
13
MUOR/templates/loader.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!-- templates/loader.html -->
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block title %}Loader{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h3 style="text-align: center;">Your instance is getting ready. Please wait... </h3>
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<div class="spinner-grow" style="width: 3rem; height: 3rem;" role="status">
|
||||||
|
<span class="sr-only">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user