1
+ ServerName localhost:8080
2
+
3
+ <VirtualHost *:80 >
4
+ ErrorLog ${APACHE_LOG_DIR}/error.log
5
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
6
+
7
+ RewriteEngine On
8
+
9
+ ###########################################################################
10
+ # Ensure plaintext files are served using UTF-8
11
+ AddCharset utf-8 .txt
12
+ # Set conservative/secure defaults
13
+ <Directory / >
14
+ AllowOverride None
15
+ DirectoryIndex index.html
16
+ Options -Indexes
17
+ </Directory >
18
+ # Git
19
+ <DirectoryMatch "/\.git" >
20
+ Require all denied
21
+ </DirectoryMatch >
22
+ # Subversion
23
+ <DirectoryMatch "/\.svn" >
24
+ Require all denied
25
+ </DirectoryMatch >
26
+ # Deny access to accidental uploads of macOS-specific directories and files
27
+ # .DS_Store
28
+ <FilesMatch "^(\._)?\.[Dd][Ss]_[Ss]tore" >
29
+ Require all denied
30
+ </FilesMatch >
31
+ # resource forks
32
+ <DirectoryMatch "/__MACOSX" >
33
+ Require all denied
34
+ </DirectoryMatch >
35
+
36
+ ###########################################################################
37
+ # WordPress/Default
38
+ DocumentRoot /var/www/dev
39
+ <Directory /var/www/dev >
40
+ # Expected configuration for WordPress
41
+ # (see conf-available/docker-php.conf)
42
+ AllowOverride All
43
+ DirectoryIndex index.php index.html
44
+
45
+ # WP-API
46
+ RewriteRule ^(/wp-json/.*)$ /index.php$1 [L]
47
+
48
+ # Legacy theme (hotlinked image that gives CC exposure)
49
+ RedirectPermanent /wp-content/themes/cc/images/cc.logo.white.svg https://ccstatic.org/cc2016www/images/cc.logo.white.svg
50
+
51
+ # Permalinks (for dirs/files not found)
52
+ # https://codex.wordpress.org/Using_Permalinks
53
+ # Directory Conditions
54
+ RewriteCond %{REQUEST_FILENAME} !-d
55
+ RewriteCond %{REQUEST_URI} !^/rdf
56
+ RewriteCond %{REQUEST_URI} !^/publicdomain
57
+ RewriteCond %{REQUEST_URI} !^/platform/toolkit
58
+ RewriteCond %{REQUEST_URI} !^/licen[cs]es
59
+ RewriteCond %{REQUEST_URI} !^/faq
60
+ RewriteCond %{REQUEST_URI} !^/choose
61
+ RewriteCond %{REQUEST_URI} !^/cc-legal-tools
62
+ # File Conditions
63
+ RewriteCond %{REQUEST_FILENAME} !-f
64
+ RewriteCond %{REQUEST_URI} !^/schema.rdf$
65
+ RewriteCond %{REQUEST_URI} !^/ns.html$
66
+ RewriteCond %{REQUEST_URI} !^/ns$
67
+ # Rule
68
+ RewriteRule . /index.php [L]
69
+
70
+ </Directory >
71
+
72
+ </VirtualHost >
73
+
74
+ # vim: ft=apache ts=4 sw=4 sts=4 sr et
0 commit comments