httpd-dolibarr.conf 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # Apache config file for Dolibarr
  2. <IfModule mod_alias.c>
  3. Alias /dolibarr /usr/share/dolibarr/htdocs
  4. </IfModule>
  5. # You can also use dolibarr as a VirtualHost
  6. # <VirtualHost *:*>
  7. # ServerName mydolibarrhostname.com
  8. # ServerAdmin root@example.com
  9. # DocumentRoot /usr/share/dolibarr/
  10. # ErrorLog logs/ldap.example.com-error.log
  11. # CustomLog logs/ldap.example.com-access.log common
  12. # </VirtualHost>
  13. # Directory for web pages
  14. <DirectoryMatch /usr/share/dolibarr>
  15. <IfVersion >= 2.3>
  16. Require all granted
  17. </IfVersion>
  18. <IfVersion < 2.3>
  19. Order deny,allow
  20. Allow from all
  21. </IfVersion>
  22. DirectoryIndex index.php
  23. Options +FollowSymLinks +Indexes
  24. ErrorDocument 401 /public/error-401.php
  25. ErrorDocument 404 /public/error-404.php
  26. <IfModule mod_php4.c>
  27. php_flag magic_quotes_gpc Off
  28. php_flag register_globals Off
  29. </IfModule>
  30. <IfModule mod_php5.c>
  31. php_flag magic_quotes_gpc Off
  32. php_flag register_globals Off
  33. </IfModule>
  34. # OPTIMIZE: To use gzip compressed files (for Dolibarr already compressed files).
  35. # Note that constant MAIN_OPTIMIZE_SPEED must have a value with bit 0 set.
  36. #AddType text/javascript .jgz
  37. #AddEncoding gzip .jgz
  38. # OPTIMIZE: To use gzip compression (on the fly).
  39. # Note that you must also enable the module mod_deflate.
  40. # You can also set this with constant MAIN_OPTIMIZE_SPEED and bit 2 set.
  41. #TODO
  42. # OPTIMIZE: To use cache on static pages (A259200 = 1 month).
  43. # Note that you must also enable the module mod_expires.
  44. #ExpiresActive On
  45. #ExpiresByType image/x-icon A2592000
  46. #ExpiresByType image/gif A2592000
  47. #ExpiresByType image/png A2592000
  48. #ExpiresByType image/jpeg A2592000
  49. #ExpiresByType text/css A2592000
  50. #ExpiresByType text/javascript A2592000
  51. #ExpiresByType application/x-javascript A2592000
  52. #ExpiresByType application/javascript A2592000
  53. </DirectoryMatch>
  54. # Directory for public pages
  55. <DirectoryMatch /usr/share/dolibarr/public>
  56. <IfVersion >= 2.3>
  57. Require all granted
  58. </IfVersion>
  59. <IfVersion < 2.3>
  60. Order deny,allow
  61. Allow from all
  62. </IfVersion>
  63. AllowOverride All
  64. </DirectoryMatch>
  65. # Config files
  66. <DirectoryMatch /etc/dolibarr>
  67. <IfVersion >= 2.3>
  68. Require all granted
  69. </IfVersion>
  70. <IfVersion < 2.3>
  71. Order deny,allow
  72. Allow from all
  73. </IfVersion>
  74. AllowOverride All
  75. </DirectoryMatch>
  76. # Directory for data files
  77. <DirectoryMatch /usr/share/dolibarr/documents>
  78. <IfVersion >= 2.3>
  79. Require all granted
  80. </IfVersion>
  81. <IfVersion < 2.3>
  82. Order deny,allow
  83. Allow from all
  84. </IfVersion>
  85. AllowOverride All
  86. </DirectoryMatch>
  87. <DirectoryMatch /var/lib/dolibarr/documents>
  88. <IfVersion >= 2.3>
  89. Require all granted
  90. </IfVersion>
  91. <IfVersion < 2.3>
  92. Order allow,deny
  93. Allow from all
  94. </IfVersion>
  95. AllowOverride All
  96. </DirectoryMatch>