Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


centos7_webdav

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
centos7_webdav [2017/01/09 14:15] admincentos7_webdav [2017/01/09 19:01] admin
Line 19: Line 19:
  dav_fs_module (shared)  dav_fs_module (shared)
  dav_lock_module (shared)  dav_lock_module (shared)
 +</code>
 +  * Enable the headers module (for HSTS), create ''/etc/httpd/conf.modules.d/00-headers.conf''<code>
 +LoadModule headers_module modules/mod_headers.so
 </code> </code>
  
Line 65: Line 68:
   SSLCertificateKeyFile    SSLCertificateKeyFile 
   SSLCACertificateFile   SSLCACertificateFile
 +
 +  Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
  
   DocumentRoot /var/www/html/   DocumentRoot /var/www/html/
Line 100: Line 105:
 # generate password with pwgen # generate password with pwgen
 </code> </code>
-  * Change SELinux policy:<code> +  * Change SELinux policy for write access to WebDAV directory:<code> 
-semanage fcontext -a -t httpd_sys_script_rw_t "/var/www/html/user-a(/.*)?"+yum install policycoreutils-python 
 +semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/user-a(/.*)?"
 </code> </code>
   * Enable firewall:<code>   * Enable firewall:<code>
Line 107: Line 113:
 firewall-cmd --reload</code> firewall-cmd --reload</code>
 ====Test==== ====Test====
 +  * For example from Gnome Nautilus.
centos7_webdav.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1