-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtaccess_example
More file actions
39 lines (30 loc) · 1.08 KB
/
Copy pathhtaccess_example
File metadata and controls
39 lines (30 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# RULES handles Apache Digest authentication.
AuthType Digest
# Better to use "YOUR_COMPANY_NAME" here:
AuthName "CGRU"
# Replace your site address:
AuthDigestDomain /data/cgru/ https://rules.cgru.info
# This files will be used to store digest passwords and groups
AuthDigestProvider file
AuthGroupFile /data/cgru/.htgroups
AuthUserFile /data/cgru/.htdigest
Require valid-user
<FilesMatch "\.(js|css)$">
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</FilesMatch>
# Needed utils:
# sudo apt-get install apache2-utils libapache2-mod-wsgi-py3 python3-psycopg2
# sudo apt-get install exiftool mediainfo imagemagick ffmpeg
# Remove /icons/ alias
# sudo rm /etc/apache2/mods-enabled/alias.conf
# Needed modules:
# sudo a2enmod ssl auth_digest authz_groupfile wsgi headers
# Crate first user and group:
# # Usage: htdigest [-c] passwordfile realm username
# # The -c flag creates a new file.
# htdigest -c .htdigest CGRU admin
# echo admins:admin > .htgroups