Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos
Commits
3d0958de
Commit
3d0958de
authored
May 29, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use html5as as webdav for keeweb
parent
92fc7234
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
6 deletions
+72
-6
software/html5as/buildout.hash.cfg
software/html5as/buildout.hash.cfg
+3
-3
software/html5as/instance_html5as.cfg.in
software/html5as/instance_html5as.cfg.in
+5
-2
software/html5as/software.cfg
software/html5as/software.cfg
+2
-1
software/html5as/templates/nginx_conf_webdav.in
software/html5as/templates/nginx_conf_webdav.in
+62
-0
No files found.
software/html5as/buildout.hash.cfg
View file @
3d0958de
...
@@ -21,11 +21,11 @@ md5sum = 23c15a579b66cef866b30a2f53b1b737
...
@@ -21,11 +21,11 @@ md5sum = 23c15a579b66cef866b30a2f53b1b737
[instance_html5as]
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
_update_hash_filename_ = instance_html5as.cfg.in
md5sum =
d1b5747c064a752d7a6b09060604aa0a
md5sum =
c104629d115e12f33f3394b335ffe489
[template_nginx_conf]
[template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in
_update_hash_filename_ = templates/nginx_conf
_webdav
.in
md5sum =
61dc4c82bf48563228ce4dea6c5c6319
md5sum =
5a3a0f667fafe15bcf2781f76ebe75a6
[template_launcher]
[template_launcher]
_update_hash_filename_ = templates/launcher.in
_update_hash_filename_ = templates/launcher.in
...
...
software/html5as/instance_html5as.cfg.in
View file @
3d0958de
...
@@ -51,6 +51,7 @@ home = ${buildout:directory}
...
@@ -51,6 +51,7 @@ home = ${buildout:directory}
etc = ${:home}/etc
etc = ${:home}/etc
var = ${:home}/var
var = ${:home}/var
srv = ${:home}/srv
srv = ${:home}/srv
webdav = ${:srv}/webdav
[basedirectory]
[basedirectory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
...
@@ -90,8 +91,8 @@ path_access_log = ${basedirectory:log}/nginx.access.log
...
@@ -90,8 +91,8 @@ path_access_log = ${basedirectory:log}/nginx.access.log
path_error_log = ${basedirectory:log}/nginx.error.log
path_error_log = ${basedirectory:log}/nginx.error.log
path_tmp = ${tempdirectory:tmp}
path_tmp = ${tempdirectory:tmp}
# Docroot
# Docroot
docroot = ${docroot:location}
#
docroot = ${docroot:location}
default_index = ${:docroot}/index.html
#
default_index = ${:docroot}/index.html
# Config files
# Config files
path_nginx_conf = ${directory:etc}/nginx.conf
path_nginx_conf = ${directory:etc}/nginx.conf
path_mime_types = ${directory:etc}/mime_types
path_mime_types = ${directory:etc}/mime_types
...
@@ -112,6 +113,8 @@ output = ${html5as:path_nginx_conf}
...
@@ -112,6 +113,8 @@ output = ${html5as:path_nginx_conf}
context =
context =
section param_html5as html5as
section param_html5as html5as
section param_tempdir tempdirectory
section param_tempdir tempdirectory
raw password_file {{ parameter_dict['password_file_path'] }}
key webdav_dir directory:webdav
# Render necessary mime types file for nginx
# Render necessary mime types file for nginx
[mime_types]
[mime_types]
...
...
software/html5as/software.cfg
View file @
3d0958de
...
@@ -13,6 +13,7 @@ extends =
...
@@ -13,6 +13,7 @@ extends =
# In this example we extend needed components for html5as.
# In this example we extend needed components for html5as.
../../component/nginx/buildout.cfg
../../component/nginx/buildout.cfg
../../component/dash/buildout.cfg
../../component/dash/buildout.cfg
../../component/git/buildout.cfg
parts =
parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
...
@@ -31,7 +32,7 @@ output = ${buildout:directory}/template.cfg
...
@@ -31,7 +32,7 @@ output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
context =
context =
section buildout buildout
section buildout buildout
key nginx_location nginx:location
key nginx_location nginx
-webdav
:location
key dash_location dash:location
key dash_location dash:location
key template_nginx_conf_target template_nginx_conf:target
key template_nginx_conf_target template_nginx_conf:target
key template_mime_types_target template_mime_types:target
key template_mime_types_target template_mime_types:target
...
...
software/html5as/templates/nginx_conf_webdav.in
0 → 100644
View file @
3d0958de
worker_processes {{ param_html5as['nb_workers'] }};
pid {{ param_html5as['path_pid'] }};
error_log {{ param_html5as['path_error_log'] }};
daemon off;
events {
worker_connections 1024;
accept_mutex off;
}
http {
include {{ param_html5as['path_mime_types'] }};
default_type application/octet-stream;
types_hash_bucket_size 64;
access_log {{ param_html5as['path_access_log'] }} combined;
index index.html;
server {
listen [{{ param_html5as['ip'] }}]:{{ param_html5as['port'] }};
server_name _;
keepalive_timeout 5;
client_body_temp_path {{ param_tempdir['client_body_temp_path'] }};
proxy_temp_path {{ param_tempdir['proxy_temp_path'] }};
fastcgi_temp_path {{ param_tempdir['fastcgi_temp_path'] }};
uwsgi_temp_path {{ param_tempdir['uwsgi_temp_path'] }};
scgi_temp_path {{ param_tempdir['scgi_temp_path'] }};
# path for static files
root {{ webdav_dir }};
auth_basic realm_name;
auth_basic_user_file {{ password_file }};
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
dav_access user:rw group:rw all:rw;
autoindex on;
client_max_body_size 0;
create_full_put_path on;
location / {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, HEAD, POST, PUT, OPTIONS, MOVE, DELETE, COPY, LOCK, UNLOCK' always;
add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Accept-Charset,X-Accept,origin,accept,if-match,destination,overwrite' always;
add_header 'Access-Control-Expose-Headers' 'ETag' always;
add_header 'Access-Control-Max-Age' 1728000 always;
if ($request_method = 'OPTIONS') {
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, HEAD, POST, PUT, OPTIONS, MOVE, DELETE, COPY, LOCK, UNLOCK';
add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Accept-Charset,X-Accept,origin,accept,if-match,destination,overwrite';
add_header 'Access-Control-Expose-Headers' 'ETag';
add_header 'Access-Control-Max-Age' 1728000;
return 204;
}
}
}
}
Write
Preview
Markdown
is supported
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