Guest User

Untitled

a guest
Sep 7th, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. ####################
  2. # Serveur Bagu.biz #
  3. ####################
  4.  
  5. # VirtualHost pour le port 80 (HTTP)
  6. <VirtualHost *:80>
  7. ServerName bagu.biz
  8. ServerAlias autoconfig.bagu.biz blog.bagu.biz genealogie.bagu.biz webmail.bagu.biz www.bagu.biz
  9.  
  10. # Redirection vers HTTPS
  11. RewriteEngine On
  12. RewriteCond %{HTTPS} !=on
  13. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  14. </VirtualHost>
  15.  
  16. <VirtualHost *:443>
  17. ServerName bagu.biz
  18. ServerAlias autoconfig.bagu.biz blog.bagu.biz genealogie.bagu.biz webmail.bagu.biz www.bagu.biz
  19.  
  20. DocumentRoot ${APACHE_WORK_DIR}/wwwbagubiz/html/
  21. # Définition du VirtualDocumentRoot pour les sous-domaines
  22. VirtualDocumentRoot ${APACHE_WORK_DIR}/wwwbagubiz/html/%1
  23.  
  24. # Activation du SSL/TLS
  25. SSLEngine On
  26. SSLCertificateFile ${CERT_DIR}/fullchain.cer
  27. SSLCertificateKeyFile ${CERT_DIR}/cert.key
  28. SSLCACertificateFile ${CERT_DIR}/cacert.pem
  29. SSLUseStapling on
  30.  
  31. # Réécriture pour forcer l'utilisation de www
  32. RewriteEngine On
  33. RewriteCond %{HTTP_HOST} ^bagu.biz [NC]
  34. RewriteRule ^ %{REQUEST_SCHEME}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  35.  
  36. <IfModule fcgid_module>
  37. <Files ~ "\.php$">
  38. AddHandler fcgid-script .php
  39. FcgidWrapper "${PHP_DIR}/php-cgi.exe -d error_log=${PHP_LOG_DIR}/bagu.biz.php_error.log" .php
  40. </Files>
  41. </IfModule>
  42.  
  43. ErrorLog ${APACHE_LOG_DIR}/bagu.biz.apache.error.log
  44.  
  45. <Directory ${APACHE_WORK_DIR}/wwwbagubiz/html/>
  46. Options +FollowSymLinks -Indexes -Includes -ExecCGI
  47. AllowOverride all
  48. <RequireAll>
  49. Require all granted
  50. Require not env BlockCountry
  51. </RequireAll>
  52. </Directory>
  53. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment