| Line 14... |
Line 14... |
| 14 |
#
|
14 |
#
|
| 15 |
# When we also provide SSL we have to listen to the
|
15 |
# When we also provide SSL we have to listen to the
|
| 16 |
# the HTTPS port in addition.
|
16 |
# the HTTPS port in addition.
|
| 17 |
#
|
17 |
#
|
| 18 |
Listen 443
|
18 |
Listen 443
|
| - |
|
19 |
NameVirtualHost *:443
|
| 19 |
|
20 |
|
| 20 |
##
|
21 |
##
|
| 21 |
## SSL Global Context
|
22 |
## SSL Global Context
|
| 22 |
##
|
23 |
##
|
| 23 |
## All SSL configuration in this context applies both to
|
24 |
## All SSL configuration in this context applies both to
|
| Line 69... |
Line 70... |
| 69 |
|
70 |
|
| 70 |
##
|
71 |
##
|
| 71 |
## SSL Virtual Host Context
|
72 |
## SSL Virtual Host Context
|
| 72 |
##
|
73 |
##
|
| 73 |
|
74 |
|
| 74 |
<VirtualHost _default_:443>
|
75 |
#<VirtualHost _default_:443>
|
| - |
|
76 |
<VirtualHost *:443>
|
| 75 |
|
77 |
|
| 76 |
# General setup for the virtual host, inherited from global configuration
|
78 |
# General setup for the virtual host, inherited from global configuration
|
| 77 |
DocumentRoot "/var/www/shtml"
|
79 |
DocumentRoot "/var/www/shtml"
|
| - |
|
80 |
ServerName ujsoftware.linkpc.net:443
|
| - |
|
81 |
|
| - |
|
82 |
# Use separate log files for the SSL virtual host; note that LogLevel
|
| - |
|
83 |
# is not inherited from httpd.conf.
|
| - |
|
84 |
ErrorLog logs/ssl_error_log
|
| - |
|
85 |
TransferLog logs/ssl_access_log
|
| - |
|
86 |
LogLevel warn
|
| - |
|
87 |
|
| - |
|
88 |
# SSL Engine Switch:
|
| - |
|
89 |
# Enable/Disable SSL for this virtual host.
|
| - |
|
90 |
SSLEngine on
|
| - |
|
91 |
|
| - |
|
92 |
# SSL Protocol support:
|
| - |
|
93 |
# List the enable protocol levels with which clients will be able to
|
| - |
|
94 |
# connect. Disable SSLv2 access by default:
|
| - |
|
95 |
SSLProtocol all -SSLv2 -SSLv3
|
| - |
|
96 |
|
| - |
|
97 |
# SSL Cipher Suite:
|
| - |
|
98 |
# List the ciphers that the client is permitted to negotiate.
|
| - |
|
99 |
# See the mod_ssl documentation for a complete list.
|
| - |
|
100 |
#SSLCipherSuite DEFAULT:!EXP:!SSLv2:!DES:!IDEA:!SEED:+3DES
|
| - |
|
101 |
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
|
| - |
|
102 |
SSLHonorCipherOrder On
|
| - |
|
103 |
|
| - |
|
104 |
# Server Certificate:
|
| - |
|
105 |
# Point SSLCertificateFile at a PEM encoded certificate. If
|
| - |
|
106 |
# the certificate is encrypted, then you will be prompted for a
|
| - |
|
107 |
# pass phrase. Note that a kill -HUP will prompt again. A new
|
| - |
|
108 |
# certificate can be generated using the genkey(1) command.
|
| - |
|
109 |
SSLCertificateFile /etc/letsencrypt/live/ujsoftware.linkpc.net/cert.pem
|
| - |
|
110 |
|
| - |
|
111 |
# Server Private Key:
|
| - |
|
112 |
# If the key is not combined with the certificate, use this
|
| - |
|
113 |
# directive to point at the key file. Keep in mind that if
|
| - |
|
114 |
# you've both a RSA and a DSA private key you can configure
|
| - |
|
115 |
# both in parallel (to also allow the use of DSA ciphers, etc.)
|
| - |
|
116 |
SSLCertificateKeyFile /etc/letsencrypt/live/ujsoftware.linkpc.net/privkey.pem
|
| - |
|
117 |
|
| - |
|
118 |
# Server Certificate Chain:
|
| - |
|
119 |
# Point SSLCertificateChainFile at a file containing the
|
| - |
|
120 |
# concatenation of PEM encoded CA certificates which form the
|
| - |
|
121 |
# certificate chain for the server certificate. Alternatively
|
| - |
|
122 |
# the referenced file can be the same as SSLCertificateFile
|
| - |
|
123 |
# when the CA certificates are directly appended to the server
|
| - |
|
124 |
# certificate for convinience.
|
| - |
|
125 |
SSLCertificateChainFile /etc/letsencrypt/live/ujsoftware.linkpc.net/chain.pem
|
| - |
|
126 |
|
| - |
|
127 |
# Certificate Authority (CA):
|
| - |
|
128 |
# Set the CA certificate verification path where to find CA
|
| - |
|
129 |
# certificates for client authentication or alternatively one
|
| - |
|
130 |
# huge file containing all of them (file must be PEM encoded)
|
| - |
|
131 |
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
|
| - |
|
132 |
|
| - |
|
133 |
# Client Authentication (Type):
|
| - |
|
134 |
# Client certificate verification type and depth. Types are
|
| - |
|
135 |
# none, optional, require and optional_no_ca. Depth is a
|
| - |
|
136 |
# number which specifies how deeply to verify the certificate
|
| - |
|
137 |
# issuer chain before deciding the certificate is not valid.
|
| - |
|
138 |
#SSLVerifyClient require
|
| - |
|
139 |
#SSLVerifyDepth 10
|
| - |
|
140 |
|
| - |
|
141 |
# Access Control:
|
| - |
|
142 |
# With SSLRequire you can do per-directory access control based
|
| - |
|
143 |
# on arbitrary complex boolean expressions containing server
|
| - |
|
144 |
# variable checks and other lookup directives. The syntax is a
|
| - |
|
145 |
# mixture between C and Perl. See the mod_ssl documentation
|
| - |
|
146 |
# for more details.
|
| - |
|
147 |
#<Location />
|
| - |
|
148 |
#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
|
| - |
|
149 |
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
|
| - |
|
150 |
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
|
| - |
|
151 |
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
|
| - |
|
152 |
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
|
| - |
|
153 |
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
|
| - |
|
154 |
#</Location>
|
| - |
|
155 |
|
| - |
|
156 |
# SSL Engine Options:
|
| - |
|
157 |
# Set various options for the SSL engine.
|
| - |
|
158 |
# o FakeBasicAuth:
|
| - |
|
159 |
# Translate the client X.509 into a Basic Authorisation. This means that
|
| - |
|
160 |
# the standard Auth/DBMAuth methods can be used for access control. The
|
| - |
|
161 |
# user name is the `one line' version of the client's X.509 certificate.
|
| - |
|
162 |
# Note that no password is obtained from the user. Every entry in the user
|
| - |
|
163 |
# file needs this password: `xxj31ZMTZzkVA'.
|
| - |
|
164 |
# o ExportCertData:
|
| - |
|
165 |
# This exports two additional environment variables: SSL_CLIENT_CERT and
|
| - |
|
166 |
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
|
| - |
|
167 |
# server (always existing) and the client (only existing when client
|
| - |
|
168 |
# authentication is used). This can be used to import the certificates
|
| - |
|
169 |
# into CGI scripts.
|
| - |
|
170 |
# o StdEnvVars:
|
| - |
|
171 |
# This exports the standard SSL/TLS related `SSL_*' environment variables.
|
| - |
|
172 |
# Per default this exportation is switched off for performance reasons,
|
| - |
|
173 |
# because the extraction step is an expensive operation and is usually
|
| - |
|
174 |
# useless for serving static content. So one usually enables the
|
| - |
|
175 |
# exportation for CGI and SSI requests only.
|
| - |
|
176 |
# o StrictRequire:
|
| - |
|
177 |
# This denies access when "SSLRequireSSL" or "SSLRequire" applied even
|
| - |
|
178 |
# under a "Satisfy any" situation, i.e. when it applies access is denied
|
| - |
|
179 |
# and no other module can change it.
|
| - |
|
180 |
# o OptRenegotiate:
|
| - |
|
181 |
# This enables optimized SSL connection renegotiation handling when SSL
|
| - |
|
182 |
# directives are used in per-directory context.
|
| - |
|
183 |
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
|
| - |
|
184 |
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
|
| - |
|
185 |
SSLOptions +StdEnvVars
|
| - |
|
186 |
</Files>
|
| - |
|
187 |
<Directory "/var/www/cgi-bin">
|
| - |
|
188 |
SSLOptions +StdEnvVars
|
| - |
|
189 |
</Directory>
|
| - |
|
190 |
<Directory "/var/www/shtml/ebay/listings">
|
| - |
|
191 |
Options +Indexes
|
| - |
|
192 |
IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble
|
| - |
|
193 |
</Directory>
|
| - |
|
194 |
|
| - |
|
195 |
# SSL Protocol Adjustments:
|
| - |
|
196 |
# The safe and default but still SSL/TLS standard compliant shutdown
|
| - |
|
197 |
# approach is that mod_ssl sends the close notify alert but doesn't wait for
|
| - |
|
198 |
# the close notify alert from client. When you need a different shutdown
|
| - |
|
199 |
# approach you can use one of the following variables:
|
| - |
|
200 |
# o ssl-unclean-shutdown:
|
| - |
|
201 |
# This forces an unclean shutdown when the connection is closed, i.e. no
|
| - |
|
202 |
# SSL close notify alert is send or allowed to received. This violates
|
| - |
|
203 |
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
|
| - |
|
204 |
# this when you receive I/O errors because of the standard approach where
|
| - |
|
205 |
# mod_ssl sends the close notify alert.
|
| - |
|
206 |
# o ssl-accurate-shutdown:
|
| - |
|
207 |
# This forces an accurate shutdown when the connection is closed, i.e. a
|
| - |
|
208 |
# SSL close notify alert is send and mod_ssl waits for the close notify
|
| - |
|
209 |
# alert of the client. This is 100% SSL/TLS standard compliant, but in
|
| - |
|
210 |
# practice often causes hanging connections with brain-dead browsers. Use
|
| - |
|
211 |
# this only for browsers where you know that their SSL implementation
|
| - |
|
212 |
# works correctly.
|
| - |
|
213 |
# Notice: Most problems of broken clients are also related to the HTTP
|
| - |
|
214 |
# keep-alive facility, so you usually additionally want to disable
|
| - |
|
215 |
# keep-alive for those clients, too. Use variable "nokeepalive" for this.
|
| - |
|
216 |
# Similarly, one has to force some clients to use HTTP/1.0 to workaround
|
| - |
|
217 |
# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
|
| - |
|
218 |
# "force-response-1.0" for this.
|
| - |
|
219 |
SetEnvIf User-Agent ".*MSIE.*" \
|
| - |
|
220 |
nokeepalive ssl-unclean-shutdown \
|
| - |
|
221 |
downgrade-1.0 force-response-1.0
|
| - |
|
222 |
|
| - |
|
223 |
# Per-Server Logging:
|
| - |
|
224 |
# The home of a custom SSL log file. Use this when you want a
|
| - |
|
225 |
# compact non-error SSL logfile on a virtual host basis.
|
| - |
|
226 |
CustomLog logs/ssl_request_log \
|
| - |
|
227 |
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
|
| - |
|
228 |
|
| - |
|
229 |
</VirtualHost>
|
| - |
|
230 |
|
| - |
|
231 |
|
| - |
|
232 |
|
| - |
|
233 |
|
| - |
|
234 |
|
| - |
|
235 |
#<VirtualHost _default_:443>
|
| - |
|
236 |
<VirtualHost *:443>
|
| - |
|
237 |
|
| - |
|
238 |
# General setup for the virtual host, inherited from global configuration
|
| - |
|
239 |
DocumentRoot "/var/www/cheapmusic"
|
| 78 |
#ServerName www.example.com:443
|
240 |
ServerName www.findcheapmusic.com:443
|
| 79 |
|
241 |
|
| 80 |
# Use separate log files for the SSL virtual host; note that LogLevel
|
242 |
# Use separate log files for the SSL virtual host; note that LogLevel
|
| 81 |
# is not inherited from httpd.conf.
|
243 |
# is not inherited from httpd.conf.
|
| 82 |
ErrorLog logs/ssl_error_log
|
244 |
ErrorLog logs/ssl_error_log
|
| 83 |
TransferLog logs/ssl_access_log
|
245 |
TransferLog logs/ssl_access_log
|