Advertisement
Guest User

Untitled

a guest
Aug 17th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. # xxx.conf
  2. <VirtualHost *:80>
  3. Protocols h2 h2c http/1.1
  4. ServerName xxx.com
  5. ServerAlias www.xxx.com
  6.  
  7. ServerAdmin webmaster@localhost
  8. DocumentRoot /var/www/html/xxx/public
  9.  
  10. <Directory /var/www/html/xxx/public>
  11. Header set Access-Control-Allow-Origin *
  12. Options -Indexes +FollowSymLinks
  13. Include /etc/apache2/custom.d/globalblacklist.conf
  14. DirectoryIndex index.php
  15. AllowOverride All
  16. Require all denied
  17. </Directory>
  18.  
  19.  
  20. ErrorLog ${APACHE_LOG_DIR}/xxx_error.log
  21. CustomLog ${APACHE_LOG_DIR}/xxx_access.log combined
  22.  
  23. RewriteEngine on
  24. RewriteCond %{SERVER_NAME} =xxx.com
  25. RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  26. RewriteCond %{SERVER_NAME} =www.xxx.com
  27. RewriteRule ^ https://xxx.com%{REQUEST_URI} [END,NE,R=permanent]
  28. </VirtualHost>
  29.  
  30. # xxx-le-ssl.conf
  31. <IfModule mod_ssl.c>
  32. <VirtualHost *:443>
  33. ServerName www.xxx.com
  34. RewriteEngine on
  35. RewriteCond %{SERVER_NAME} =www.xxx.com
  36. RewriteRule ^ https://xxx.com%{REQUEST_URI} [END,NE,R=permanent]
  37. SSLCertificateFile /etc/letsencrypt/live/xxx.com/fullchain.pem
  38. SSLCertificateKeyFile /etc/letsencrypt/live/xxx.com/privkey.pem
  39. Include /etc/letsencrypt/options-ssl-apache.conf
  40. </VirtualHost>
  41.  
  42. <VirtualHost *:443>
  43. Protocols h2 h2c http/1.1
  44. ServerName xxx.com
  45.  
  46. ServerAdmin webmaster@localhost
  47. DocumentRoot /var/www/html/xxx/public
  48.  
  49. <Directory /var/www/html/xxx/public>
  50. Header set Access-Control-Allow-Origin *
  51. Options -Indexes +FollowSymLinks
  52. Include /etc/apache2/custom.d/globalblacklist.conf
  53. DirectoryIndex index.php
  54. AllowOverride All
  55. Require all denied
  56. </Directory>
  57.  
  58. RewriteEngine on
  59. RewriteRule .* - [E=REQ:%{THE_REQUEST}]
  60.  
  61. ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client %a] %M% ~ Referer: %-{Referer}i ~ Request: %{REQ}e ~ UserAgent: %{User-Agent}i"
  62. ErrorLog ${APACHE_LOG_DIR}/xxx_error.log
  63. CustomLog ${APACHE_LOG_DIR}/xxx_access.log combined
  64.  
  65. SSLCertificateFile /etc/letsencrypt/live/xxx.com-0001/fullchain.pem
  66. SSLCertificateKeyFile /etc/letsencrypt/live/xxx.com-0001/privkey.pem
  67. Include /etc/letsencrypt/options-ssl-apache.conf
  68. </VirtualHost>
  69. </IfModule>
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement