-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache-vhost.conf
55 lines (45 loc) · 1.94 KB
/
apache-vhost.conf
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
LoadModule auth_digest_module libexec/apache24/mod_auth_digest.so
LoadModule deflate_module libexec/apache24/mod_deflate.so
LoadModule ssl_module libexec/apache24/mod_ssl.so
LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so
LoadModule proxy_module libexec/apache24/mod_proxy.so
LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip
Listen 443
SSLProtocol All -SSLv2 -SSLv3 -TLSv1
SSLCipherSuite HIGH:!aNULL:!RSA:!AES128:!SSLv2:!SSLv3:!TLSv1
SSLHonorCipherOrder on
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:/var/run/ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost *:80>
ServerName content.example.com:80
RedirectPermanent / https://content.example.com/
</VirtualHost>
<VirtualHost *:443>
SetEnv CONTENT_TITLE "CONTENT EXAMPLE"
ServerName content.example.com:443
ServerAdmin [email protected]
DocumentRoot "/usr/local/www/ContentCGI/webdocs"
<Directory "/usr/local/www/ContentCGI/webdocs">
Require all granted
</Directory>
<LocationMatch "^(/_|/.*/_).*$">
ProxyPass "unix:/tmp/ContentCGI.sock|fcgi://content.example.com"
SSLOptions +StdEnvVars
</LocationMatch>
<Location "/edit/">
AuthType Digest
AuthDigestProvider file
AuthUserFile "etc/apache24/ContentEditors.passwd"
AuthName ContentEditors
AuthDigestDomain /
Require valid-user
ProxyPass "unix:/tmp/ContentCGI.sock|fcgi://content.example.com/edit/"
SSLOptions +StdEnvVars
</Location>
SSLEngine on
SSLCertificateFile "etc/letsencrypt/live/example.com/fullchain.pem"
SSLCertificateKeyFile "etc/letsencrypt/live/example.com/privkey.pem"
</VirtualHost>