Guest User

Untitled

a guest
Aug 16th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerName gobokolektif.com
  3. ServerAlias www.gobokolektif.com
  4.  
  5.  
  6. DocumentRoot /var/www/html
  7. ErrorLog ${APACHE_LOG_DIR}/error.log
  8. CustomLog ${APACHE_LOG_DIR}/access.log combined
  9.  
  10. <Directory /var/www/html>
  11. Options Indexes FollowSymLinks MultiViews
  12. AllowOverride All
  13. Order allow,deny
  14. allow from all
  15. Require all granted
  16. </Directory>
  17.  
  18. </VirtualHost>
  19.  
  20. <VirtualHost *:443>
  21. ServerName gobokolektif.com
  22. ServerAlias www.gobokolektif.com
  23.  
  24.  
  25. <Directory /var/www/html>
  26. Options Indexes FollowSymLinks MultiViews
  27. AllowOverride All
  28. Order allow,deny
  29. allow from all
  30. Require all granted
  31. </Directory>
  32.  
  33.  
  34. ServerAdmin root@gobokolektif.com
  35. DocumentRoot /var/www/html
  36. SSLEngine on
  37. SSLCertificateFile /etc/ssl/gobokolektif.com.crt
  38. SSLCertificateKeyFile /etc/ssl/gobokolektif.com.key
  39. SSLCACertificateFile /etc/ssl/intermediate.crt
  40.  
  41.  
  42. ErrorLog ${APACHE_LOG_DIR}/error.log
  43. CustomLog ${APACHE_LOG_DIR}/access.log combined
  44. </VirtualHost>
  45. ```
  46.  
  47. **My "default-ssl.conf" looks like this:**
  48.  
  49.  
  50.  
  51.  
  52. <IfModule mod_ssl.c>
  53. <VirtualHost _default_:443>
  54. ServerAdmin root@localhost
  55. ServerName gobokolektif.com:443
  56.  
  57. DocumentRoot /var/www/html
  58. <Directory /var/www/html>
  59. Options Indexes FollowSymLinks MultiViews
  60. AllowOverride All
  61. Order allow,deny
  62. allow from all
  63. Require all granted
  64. </Directory>
  65.  
  66.  
  67. ErrorLog ${APACHE_LOG_DIR}/error.log
  68. CustomLog ${APACHE_LOG_DIR}/access.log combined
  69.  
  70. SSLEngine on
  71. SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
  72. SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  73.  
  74.  
  75. <FilesMatch ".(cgi|shtml|phtml|php)$">
  76. SSLOptions +StdEnvVars
  77. </FilesMatch>
  78. <Directory /usr/lib/cgi-bin>
  79. SSLOptions +StdEnvVars
  80. </Directory>
  81.  
  82.  
  83. </VirtualHost>
  84. </IfModule>
  85.  
  86. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  87.  
  88.  
  89. **My ports.conf looks like this:**
  90.  
  91.  
  92. Listen 80
  93.  
  94.  
  95.  
  96. <IfModule ssl_module>
  97.  
  98. Listen 443
  99. </IfModule>
  100.  
  101. <IfModule mod_gnutls.c>
  102. Listen 443
  103. </IfModule>
  104.  
  105. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  106.  
  107. Mutex file:${APACHE_LOCK_DIR} default
  108.  
  109. PidFile ${APACHE_PID_FILE}
  110.  
  111. Timeout 300
  112.  
  113. KeepAlive On
  114.  
  115. MaxKeepAliveRequests 100
  116.  
  117. KeepAliveTimeout 5
  118.  
  119.  
  120. User ${APACHE_RUN_USER}
  121. Group ${APACHE_RUN_GROUP}
  122.  
  123. HostnameLookups Off
  124.  
  125.  
  126. ErrorLog ${APACHE_LOG_DIR}/error.log
  127.  
  128.  
  129. LogLevel warn
  130.  
  131.  
  132. IncludeOptional mods-enabled/*.load
  133. IncludeOptional mods-enabled/*.conf
  134.  
  135.  
  136. Include ports.conf
  137.  
  138.  
  139. <Directory />
  140. Options FollowSymLinks
  141. AllowOverride None
  142. Require all denied
  143. </Directory>
  144.  
  145. <Directory /usr/share>
  146. AllowOverride None
  147. Require all granted
  148. </Directory>
  149.  
  150. <Directory /var/www>
  151. Options Indexes FollowSymLinks
  152. AllowOverride All
  153. Require all granted
  154. </Directory>
  155.  
  156. #<Directory /srv/>
  157. # Options Indexes FollowSymLinks
  158. # AllowOverride None
  159. # Require all granted
  160. #</Directory>
  161.  
  162.  
  163. AccessFileName .htaccess
  164.  
  165.  
  166. <FilesMatch "^.ht">
  167. Require all denied
  168. </FilesMatch>
  169.  
  170.  
  171.  
  172. LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined
  173. LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" combined
  174. LogFormat "%h %l %u %t "%r" %>s %O" common
  175. LogFormat "%{Referer}i -> %U" referer
  176. LogFormat "%{User-agent}i" agent
  177.  
  178.  
  179.  
  180.  
  181. IncludeOptional conf-enabled/*.conf
  182.  
  183.  
  184. IncludeOptional sites-enabled/*.conf
  185.  
  186. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  187. ServerName localhost
Add Comment
Please, Sign In to add comment