Guest User

Untitled

a guest
Mar 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. <IfModule log_config_module>
  2. LogFormat "%v:%a %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %{CF-Connecting-IP}i" combinedvhost
  3. LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %{CF-Connecting-IP}i" combined
  4. LogFormat "%h %l %u %t "%r" %>s %b %{CF-Connecting-IP}i" common
  5.  
  6. CustomLog "logs/access_log" combined
  7. CustomLog logs/access_log combinedvhost
  8.  
  9. <IfModule logio_module>
  10. LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %{CF-Connecting-IP}i" combinedio
  11. </IfModule>
  12.  
  13. </IfModule>
  14.  
  15. <IfModule mod_log_config.c>
  16. LogFormat "%v:%a %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %{CF-Connecting-IP}i" combinedvhost
  17. LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %{CF-Connecting-IP}i" combined
  18. LogFormat "%h %l %u %t "%r" %>s %b %{CF-Connecting-IP}i" common
  19. LogFormat "%{Referer}i -> %U" referer
  20. LogFormat "%{User-agent}i" agent
  21.  
  22. CustomLog logs/access_log common
  23. CustomLog logs/access_log combined
  24. CustomLog logs/access_log combinedvhost
  25.  
  26. </IfModule>
  27.  
  28. <VirtualHost *:80>
  29. ServerName www.site1.com
  30. DocumentRoot /var/www/www.site1.com/htdocs
  31. CustomLog /var/log/apache/www.site1.com-access.log combined
  32. ErrorLog /var/log/apache/www.site1.com-error.log
  33. </VirtualHost>
  34.  
  35. <VirtualHost *:80>
  36. ServerName www.site2.com
  37. DocumentRoot /var/www/www.site2.com/htdocs
  38. CustomLog /var/log/apache/www.site2.com-access.log combined
  39. ErrorLog /var/log/apache/www.site2.com-error.log
  40. </VirtualHost>
  41.  
  42. <VirtualHost *:443>
  43. ServerName my.site.com
  44. LogFormat "%{X-Forwarded-For}i %l %u %t "%r" %>s %b %D " commonvhost
  45. ErrorLog "|/opt/mw/apache-2.4.25-instance1/bin/rotatelogs /apps/logs/my.site.com-443-error.%Y.%m.%d.log 86400"
  46. CustomLog "|/opt/mw/apache-2.4.25-instance1/bin/rotatelogs /apps/logs/my.site.com-443-access.%Y.%m.%d.log 86400" commonvhost
  47. </VirtualHost>
  48.  
  49. <VirtualHost *:80>
  50. ServerName my.site.com
  51. LogFormat "%{X-Forwarded-For}i %l %u %t "%r" %>s %b %D " commonvhost
  52. ErrorLog "|/opt/mw/apache-2.4.25-instance1/bin/rotatelogs /apps/logs/my.site.com-80-error.%Y.%m.%d.log 86400"
  53. CustomLog "|/opt/mw/apache-2.4.25-instance1/bin/rotatelogs /apps/logs/my.site.com-80-access.%Y.%m.%d.log 86400" commonvhost
  54. </VirtualHost>
Add Comment
Please, Sign In to add comment