api.conf 6.7 KB

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