https.conf 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ServerTokens OS
  2. ServerRoot /var/www
  3. ServerSignature On
  4. ServerName localhost
  5. DocumentRoot "/var/www/html/4get"
  6. LogLevel warn
  7. CustomLog /dev/null common
  8. ErrorLog /dev/null
  9. <VirtualHost *:443>
  10. SSLEngine on
  11. SSLCertificateFile /etc/4get/certs/fullchain.pem
  12. SSLCertificateKeyFile /etc/4get/certs/privkey.pem
  13. </VirtualHost>
  14. <Directory "/var/www/html/4get">
  15. RewriteEngine On
  16. RewriteCond %{THE_REQUEST} ^\w+\ /(.*)\.php(\?.*)?\ HTTP/
  17. RewriteRule ^ http://%{HTTP_HOST}/%1 [R=301]
  18. RewriteCond %{REQUEST_FILENAME}.php -f
  19. RewriteRule .* $0.php
  20. Options FollowSymLinks
  21. AllowOverride None
  22. Require all granted
  23. </Directory>
  24. # deny access to private resources
  25. <Directory "/var/www/html/4get/data">
  26. Require all denied
  27. <Files "*">
  28. Require all denied
  29. </Files>
  30. </Directory>
  31. LoadModule rewrite_module modules/mod_rewrite.so
  32. LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
  33. LoadModule authn_file_module modules/mod_authn_file.so
  34. LoadModule authn_core_module modules/mod_authn_core.so
  35. LoadModule authz_host_module modules/mod_authz_host.so
  36. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  37. LoadModule authz_user_module modules/mod_authz_user.so
  38. LoadModule authz_core_module modules/mod_authz_core.so
  39. LoadModule access_compat_module modules/mod_access_compat.so
  40. LoadModule auth_basic_module modules/mod_auth_basic.so
  41. LoadModule reqtimeout_module modules/mod_reqtimeout.so
  42. LoadModule filter_module modules/mod_filter.so
  43. LoadModule mime_module modules/mod_mime.so
  44. LoadModule log_config_module modules/mod_log_config.so
  45. LoadModule env_module modules/mod_env.so
  46. LoadModule headers_module modules/mod_headers.so
  47. LoadModule setenvif_module modules/mod_setenvif.so
  48. LoadModule version_module modules/mod_version.so
  49. LoadModule unixd_module modules/mod_unixd.so
  50. LoadModule status_module modules/mod_status.so
  51. LoadModule autoindex_module modules/mod_autoindex.so
  52. LoadModule dir_module modules/mod_dir.so
  53. LoadModule alias_module modules/mod_alias.so
  54. LoadModule negotiation_module modules/mod_negotiation.so
  55. <IfModule unixd_module>
  56. User apache
  57. Group apache
  58. </IfModule>
  59. <Directory />
  60. AllowOverride none
  61. Require all denied
  62. </Directory>
  63. <IfModule dir_module>
  64. DirectoryIndex index.html
  65. </IfModule>
  66. <Files ".ht*">
  67. Require all denied
  68. </Files>
  69. <IfModule headers_module>
  70. RequestHeader unset Proxy early
  71. </IfModule>
  72. <IfModule mime_module>
  73. TypesConfig /etc/apache2/mime.types
  74. AddType application/x-compress .Z
  75. AddType application/x-gzip .gz .tgz
  76. </IfModule>
  77. <IfModule mime_magic_module>
  78. MIMEMagicFile /etc/apache2/magic
  79. </IfModule>
  80. IncludeOptional /etc/apache2/conf.d/*.conf