Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. example.com # shows index.html in root or error page if not exist
  2. example.com/test.txt # shows test.txt in root
  3. example.com/test.php # runs if IP matches or error page if not exist
  4. example.com/dir1 # shows index.html in dir1 or error page if not exist
  5. example.com/dir1/test.txt # shows test.txt in dir1
  6. example.com/dir2 # shows index.html for dir2 if IP matches or error page
  7.  
  8. ...
  9. <FilesMatch "^.*$>
  10. Require all denied
  11. </FilesMtch>
  12. <FilesMatch "^.*.(html|txt|pdf)$">
  13. Require all granted
  14. </FilesMatch>
  15. <FilesMatch "^.*.php$">
  16. Require ip 192.168.0.10
  17. </FilesMatch>
  18.  
  19. <Directory />
  20. AllowOverride None
  21. Require all denied
  22. </Directory>
  23. <Directory /var/www/html>
  24. AllowOverride None
  25. Options Indexes FollowSymLinks
  26. <LimitExcept GET POST OPTIONS>
  27. Require all granted
  28. </LimitExcept>
  29. </Directory>
  30. <Directory /var/www/htm/dir2>
  31. AllowOverride None
  32. Require ip 192.168.0.10
  33. <Directory>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement