README 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. $OpenBSD: README,v 1.1.1.1 2016/09/13 16:24:37 sthen Exp $
  2. +-----------------------------------------------------------------------
  3. | Running ${FULLPKGNAME} on OpenBSD
  4. +-----------------------------------------------------------------------
  5. Configuring Tomcat to support Lucee
  6. ===================================
  7. Lucee is a Java-based CFML engine. It runs as a servlet in a container;
  8. this package is designed to work with the Apache Tomcat servlet container,
  9. you will need to make a few configuration changes to tomcat to use it.
  10. If you have not yet modified Tomcat's configuration, this readme includes
  11. a patch which can be used:
  12. # patch -d ${CATALINA_BASE}/conf < \
  13. ${LOCALBASE}/share/doc/pkg-readmes/${FULLPKGNAME}
  14. Then skip to the next section in this file, "Starting the service
  15. and online configuration".
  16. If you have already modified Tomcat's configuration and need to edit
  17. manually, there are two possible ways to proceed.
  18. 1. Insert the contents of ${PREFIX}/conf/web-lucee.xml in Tomcat's
  19. ${CATALINA_BASE}/conf/web.xml file. This will need to be kept up-to-date
  20. with future Lucee releases.
  21. -or-
  22. 2. Modify Tomcat configuration to include web-lucee.xml itself; this is
  23. the method used by the patch below, initial setup is slightly more complex
  24. but ongoing maintenance is reduced.
  25. a) Change the <Context> line in ${CATALINA_BASE}/conf/context.xml to read
  26. <Context xmlBlockExternal="false">.
  27. b) Add lines after the first <?xml...?> line at the top of
  28. ${CATALINA_BASE}/conf/web.xml, so it looks like this:
  29. <?xml version="1.0" encoding="ISO-8859-1"?>
  30. <!DOCTYPE root [
  31. <!ENTITY lucee SYSTEM "./web-lucee.xml" >
  32. ]>
  33. c) Towards the bottom of web.xml, add the CFML-related file extensions
  34. to the <welcome-file-list> section:
  35. <welcome-file-list>
  36. <welcome-file>index.cfm</welcome-file>
  37. <welcome-file>index.html</welcome-file>
  38. <welcome-file>index.htm</welcome-file>
  39. <welcome-file>index.jsp</welcome-file>
  40. </welcome-file-list>
  41. d) Add "&lucee;" at the bottom of the </web-app> section to include
  42. the "lucee" xml entity defined above. This tells Tomcat to include
  43. the contents of the web-lucee.xml file containing the Lucee-related
  44. settings.
  45. &lucee;
  46. </web-app>
  47. Starting the service and online configuration
  48. =============================================
  49. # rcctl enable tomcat
  50. - If you need to set JVM options you can do so like this:
  51. # rcctl set tomcat flags -Xms256m -Xmx1024m -XX:MaxPermSize=128m
  52. # rcctl restart tomcat
  53. - Connect to the server and web administration pages. At first run of
  54. a successful new installation, you will be prompted to set passwords.
  55. http://localhost:8080/lucee/admin/server.cfm
  56. http://localhost:8080/lucee/admin/web.cfm
  57. - The package places the default "welcome" pages in a separate directory,
  58. ${CATALINA_BASE}/webapps/lucee-default; copy them to ${CATALINA_BASE}/webapps/ROOT
  59. if you want to see them when you connect to http://localhost:8080/.
  60. - Reference documentation is available at http://localhost:8080/lucee/doc/.
  61. - You can add pages to /var/tomcat/webapps/ROOT to be used for "localhost".
  62. Additional host configurations can be added to ${CATALINA_BASE}/conf/server.xml.
  63. Use the localhost configuration as a template; the _tomcat user will need to be
  64. able to write to <appBase>/ROOT/WEB-INF, so set ownership and permissions
  65. accordingly.
  66. - Log files are kept in several locations. Consult them if things don't work
  67. as expected, and don't forget to rotate/archive them as appropriate.
  68. ${CATALINA_BASE}/logs
  69. ${CATALINA_BASE}/lucee/config/server/lucee-server/context/logs
  70. ${CATALINA_BASE}/lucee/config/web/*/logs (various dirs, per-context)
  71. Patch to unmodified Tomcat sample configuration
  72. ===============================================
  73. --- context.xml.orig Mon Mar 31 11:20:33 2014
  74. +++ context.xml Mon Mar 31 11:20:50 2014
  75. @@ -16,7 +16,7 @@
  76. limitations under the License.
  77. -->
  78. <!-- The contents of this file will be loaded for each web application -->
  79. -<Context>
  80. +<Context xmlBlockExternal="false">
  81. <!-- Default set of monitored resources -->
  82. <WatchedResource>WEB-INF/web.xml</WatchedResource>
  83. --- web.xml.orig Tue Mar 19 22:29:42 2013
  84. +++ web.xml Tue Mar 19 22:29:55 2013
  85. @@ -1,4 +1,8 @@
  86. <?xml version="1.0" encoding="ISO-8859-1"?>
  87. +<!DOCTYPE root [
  88. + <!ENTITY lucee SYSTEM "./web-lucee.xml" >
  89. +]>
  90. +
  91. <!--
  92. Licensed to the Apache Software Foundation (ASF) under one or more
  93. contributor license agreements. See the NOTICE file distributed with
  94. @@ -4675,9 +4679,11 @@
  95. <!-- to use within your application. -->
  96. <welcome-file-list>
  97. + <welcome-file>index.cfm</welcome-file>
  98. <welcome-file>index.html</welcome-file>
  99. <welcome-file>index.htm</welcome-file>
  100. <welcome-file>index.jsp</welcome-file>
  101. </welcome-file-list>
  102. +&lucee;
  103. </web-app>