Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stechuhr-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pandemic_Response
stechuhr-server
Commits
2c49ac4e
Commit
2c49ac4e
authored
4 years ago
by
Tee
Browse files
Options
Downloads
Patches
Plain Diff
moved initscript, nginx config to examples
parent
d2cfc992
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/stechuhr-server.nginx
+65
-0
65 additions, 0 deletions
examples/stechuhr-server.nginx
examples/stechuhr-server.service
+0
-0
0 additions, 0 deletions
examples/stechuhr-server.service
run.sh
+1
-1
1 addition, 1 deletion
run.sh
test.sh
+1
-1
1 addition, 1 deletion
test.sh
with
67 additions
and
2 deletions
stechuhr
.
server.nginx
.config
→
examples/
stechuhr
-
server.nginx
+
65
−
0
View file @
2c49ac4e
server {
server {
server_name
stechuhr
.
server
;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name %FQDN%;
access_log /var/log/nginx/%FQDN%-access.log;
error_log /var/log/nginx/%FQDN%-error.log;
add_header Cache-Control no-cache;
add_header Cache-Control no-cache;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload;";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload;";
...
@@ -7,14 +13,27 @@ server {
...
@@ -7,14 +13,27 @@ server {
add_header X-Content-Type-Options nosniff;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-XSS-Protection "1; mode=block";
listen
80
;
listen
[::]:
80
;
client_max_body_size 10M;
client_max_body_size 10M;
client_body_buffer_size 128k;
client_body_buffer_size 128k;
#large_client_header_buffers 4 32k;
charset utf-8;
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
#add_header Public-Key-Pins 'pin-sha256=""; pin-sha256=""; max-age=2592000; includeSubDomains';
ssl on;
ssl_certificate /etc/nginx/certs/%FQDN%/server.cert;
ssl_certificate_key /etc/nginx/certs/%FQDN%/server.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
ssl_session_cache shared:SSL:10m;
ssl_dhparam /etc/ssl/dh2048.pem;
#ssl_stapling on;
#ssl_stapling_verify on;
access_log
/
var
/
log
/
nginx
/
stechuhr
.
server
-
access
.
log
;
error_log
/
var
/
log
/
nginx
/
stechuhr
.
server
-
error
.
log
;
location / {
location / {
proxy_set_header Host $host;
proxy_set_header Host $host;
...
@@ -25,13 +44,22 @@ server {
...
@@ -25,13 +44,22 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Connection "upgrade";
proxy_redirect
http
://
127
.
0
.
0
.
1
:
5
000
/ /;
proxy_redirect http://127.0.0.1:
8
000/ /;
proxy_pass
http
://
127
.
0
.
0
.
1
:
5
000
;
proxy_pass http://127.0.0.1:
8
000;
proxy_read_timeout 86400s;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
proxy_send_timeout 86400s;
allow all; # Any IP can perform any other requests
allow all; # Any IP can perform any other requests
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS';
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-Proto $scheme;
#add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
location ~ /.git/ {
deny all;
}
}
}
}
This diff is collapsed.
Click to expand it.
stechuhr-server.service
→
examples/
stechuhr-server.service
+
0
−
0
View file @
2c49ac4e
File moved
This diff is collapsed.
Click to expand it.
run.sh
+
1
−
1
View file @
2c49ac4e
#! /bin/sh
#! /bin/sh
/home/d0
/.poetry/bin/poetry run gunicorn stechuhr_server.server:app
~
/.poetry/bin/poetry run gunicorn stechuhr_server.server:app
This diff is collapsed.
Click to expand it.
test.sh
+
1
−
1
View file @
2c49ac4e
#! /bin/bash
#! /bin/bash
curl
--header
"Content-Type: application/json"
--request
POST
--data
'{"location":"lerchenfeld", "entrance":"
haupteingang
", "direction":"in", "id":"DEADBEEF42"}'
http://localhost:8000/
curl
--header
"Content-Type: application/json"
--request
POST
--data
'{"location":"lerchenfeld", "entrance":"
main
", "direction":"in", "id":"DEADBEEF42"}'
http://localhost:8000/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment