www.conf 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <VirtualHost *:80>
  2. ServerName www.ipsocloud.com
  3. DocumentRoot /var/www/www/
  4. <Directory /var/www/www>
  5. AllowOverride All
  6. Options Indexes FollowSymLinks
  7. Require all granted
  8. </Directory>
  9. RewriteEngine On
  10. RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  11. </VirtualHost>
  12. <IfModule mod_ssl.c>
  13. <VirtualHost _default_:443>
  14. ServerAdmin webmaster@localhost
  15. ServerName www.ipsocloud.com
  16. DocumentRoot /var/www/www
  17. # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  18. # error, crit, alert, emerg.
  19. # It is also possible to configure the loglevel for particular
  20. # modules, e.g.
  21. #LogLevel info ssl:warn
  22. ErrorLog ${APACHE_LOG_DIR}/error.log
  23. CustomLog ${APACHE_LOG_DIR}/access.log combined
  24. # For most configuration files from conf-available/, which are
  25. # enabled or disabled at a global level, it is possible to
  26. # include a line for only one particular virtual host. For example the
  27. # following line enables the CGI configuration for this host only
  28. # after it has been globally disabled with "a2disconf".
  29. #Include conf-available/serve-cgi-bin.conf
  30. # SSL Engine Switch:
  31. # Enable/Disable SSL for this virtual host.
  32. SSLEngine on
  33. # A self-signed (snakeoil) certificate can be created by installing
  34. # the ssl-cert package. See
  35. # /usr/share/doc/apache2/README.Debian.gz for more info.
  36. # If both key and certificate are stored in the same file, only the
  37. # SSLCertificateFile directive is needed.
  38. #SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
  39. #SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
  40. #SSLCACertificateFile /etc/ssl/ipsocloud.ca
  41. # Server Certificate Chain:
  42. # Point SSLCertificateChainFile at a file containing the
  43. # concatenation of PEM encoded CA certificates which form the
  44. # certificate chain for the server certificate. Alternatively
  45. # the referenced file can be the same as SSLCertificateFile
  46. # when the CA certificates are directly appended to the server
  47. # certificate for convinience.
  48. #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
  49. # Certificate Authority (CA):
  50. # Set the CA certificate verification path where to find CA
  51. # certificates for client authentication or alternatively one
  52. # huge file containing all of them (file must be PEM encoded)
  53. # Note: Inside SSLCACertificatePath you need hash symlinks
  54. # to point to the certificate files. Use the provided
  55. # Makefile to update the hash symlinks after changes.
  56. #SSLCACertificatePath /etc/ssl/certs/
  57. #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
  58. # Certificate Revocation Lists (CRL):
  59. # Set the CA revocation path where to find CA CRLs for client
  60. # authentication or alternatively one huge file containing all
  61. # of them (file must be PEM encoded)
  62. # Note: Inside SSLCARevocationPath you need hash symlinks
  63. # to point to the certificate files. Use the provided
  64. # Makefile to update the hash symlinks after changes.
  65. #SSLCARevocationPath /etc/apache2/ssl.crl/
  66. #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
  67. # Client Authentication (Type):
  68. # Client certificate verification type and depth. Types are
  69. # none, optional, require and optional_no_ca. Depth is a
  70. # number which specifies how deeply to verify the certificate
  71. # issuer chain before deciding the certificate is not valid.
  72. #SSLVerifyClient require
  73. #SSLVerifyDepth 10
  74. # SSL Engine Options:
  75. # Set various options for the SSL engine.
  76. # o FakeBasicAuth:
  77. # Translate the client X.509 into a Basic Authorisation. This means that
  78. # the standard Auth/DBMAuth methods can be used for access control. The
  79. # user name is the `one line' version of the client's X.509 certificate.
  80. # Note that no password is obtained from the user. Every entry in the user
  81. # file needs this password: `xxj31ZMTZzkVA'.
  82. # o ExportCertData:
  83. # This exports two additional environment variables: SSL_CLIENT_CERT and
  84. # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  85. # server (always existing) and the client (only existing when client
  86. # authentication is used). This can be used to import the certificates
  87. # into CGI scripts.
  88. # o StdEnvVars:
  89. # This exports the standard SSL/TLS related `SSL_*' environment variables.
  90. # Per default this exportation is switched off for performance reasons,
  91. # because the extraction step is an expensive operation and is usually
  92. # useless for serving static content. So one usually enables the
  93. # exportation for CGI and SSI requests only.
  94. # o OptRenegotiate:
  95. # This enables optimized SSL connection renegotiation handling when SSL
  96. # directives are used in per-directory context.
  97. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  98. <FilesMatch "\.(cgi|shtml|phtml|php)$">
  99. SSLOptions +StdEnvVars
  100. </FilesMatch>
  101. <Directory /usr/lib/cgi-bin>
  102. SSLOptions +StdEnvVars
  103. </Directory>
  104. # SSL Protocol Adjustments:
  105. # The safe and default but still SSL/TLS standard compliant shutdown
  106. # approach is that mod_ssl sends the close notify alert but doesn't wait for
  107. # the close notify alert from client. When you need a different shutdown
  108. # approach you can use one of the following variables:
  109. # o ssl-unclean-shutdown:
  110. # This forces an unclean shutdown when the connection is closed, i.e. no
  111. # SSL close notify alert is send or allowed to received. This violates
  112. # the SSL/TLS standard but is needed for some brain-dead browsers. Use
  113. # this when you receive I/O errors because of the standard approach where
  114. # mod_ssl sends the close notify alert.
  115. # o ssl-accurate-shutdown:
  116. # This forces an accurate shutdown when the connection is closed, i.e. a
  117. # SSL close notify alert is send and mod_ssl waits for the close notify
  118. # alert of the client. This is 100% SSL/TLS standard compliant, but in
  119. # practice often causes hanging connections with brain-dead browsers. Use
  120. # this only for browsers where you know that their SSL implementation
  121. # works correctly.
  122. # Notice: Most problems of broken clients are also related to the HTTP
  123. # keep-alive facility, so you usually additionally want to disable
  124. # keep-alive for those clients, too. Use variable "nokeepalive" for this.
  125. # Similarly, one has to force some clients to use HTTP/1.0 to workaround
  126. # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  127. # "force-response-1.0" for this.
  128. # BrowserMatch "MSIE [2-6]" \
  129. # nokeepalive ssl-unclean-shutdown \
  130. # downgrade-1.0 force-response-1.0
  131. SSLCertificateFile /etc/letsencrypt/live/www.ipsocloud.com/fullchain.pem
  132. SSLCertificateKeyFile /etc/letsencrypt/live/www.ipsocloud.com/privkey.pem
  133. Include /etc/letsencrypt/options-ssl-apache.conf
  134. </VirtualHost>
  135. </IfModule>
  136. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet