http.conf 2.6 KB

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