Changes

Jump to navigation Jump to search
154 bytes added ,  09:39, 19 July 2022
no edit summary
=Startup=
 
{{Announce|With Version 10, the default port has been changed from 8984 to 8080.}}
* Run one of the {{Code|basexhttp}} or {{Code|basexhttp.bat}} scripts. Call the script with the {{Code|stop}} keyword to gracefully shut down the server.
Various [[Command-Line_Options#HTTP Server|command-line options]] are available to simplify batch processing. The [[Start_Scripts|start script]] can be adjusted for individual purposes (e.g. if the default memory limit is too restrictive).
An instance of the [https://www.eclipse.org/jetty/ Jetty Web Server] will be started, which by default listens to the port {{Code|8984}}8080. Additionally, the BaseX [[Database Server]] will be started, accessible on port {{Code|1984}}. The command-line output will look something like that (the JSP warning message [https://stackoverflow.com/questions/3521654/missing-jsp-support-in-jetty-or-confusing-log-message can be ignored]):
<syntaxhighlight lang="xml">
...
Server was started (port: 1984).
HTTP Server was started (port: 89848080).HTTP STOP Server was started (port: 89858081).
</syntaxhighlight>
After startup, you can access an HTML welcome page via http://localhost:89848080.
The Jetty logging level can be adjusted by adding the following properties to the start script:
In order to deploy BaseX HTTP Services in a servlet container, you can download the WAR distribution of BaseX from the [https://basex.org/download download site], or compile it by calling <code>mvn compile war:war</code> in the <code>basex-api</code> directory. The WAR file can then be deployed following the instructions of the corresponding servlet container ([https://www.eclipse.org/jetty/documentation/current/quickstart-deploying-webapps.html Jetty], [https://tomcat.apache.org/tomcat-9.0-doc/deployer-howto.html Tomcat], etc.).
You can configure the port, context path, etc. by following the instructions of the corresponding servlet container. This is needed if you want to replace the default URL path (e.g. http://localhost:8080/rest) with a custom one (e.g. http://localhost:89848080/basex/rest).
If you use Jetty (which is the default HTTP server of BaseX), the server configuration is available via the {{Code|jetty.xml}} file, which is stored in the {{Code|WEB-INF}} directory next to the {{Code|web.xml}}. For detailed configuration, refer to the [https://www.eclipse.org/jetty/documentation/current/jetty-xml-config.html Jetty Documentation].
|}
The [[DBA]] is a web-based database administration interface written in RESTXQ. It allows you to create and administrate databases, evaluate queries in realtime, view log files, manage users, etc. It is embedded in the full distributions of BaseX, and it can be accessed after startup via http://localhost:89848080/dba/.
=Configuration=
With cURL, internet browsers, and other tools, you can specify basic authentication credentials within the request string as plain text, using the format <code>USER:PASSWORD@URL</code>. An example:
: <code>http://admin:admin@localhost:89848080/</code>
Users are specified in a {{Code|users.xml}} file, which is stored in the database directory (see [[User Management]] for more information).
=Changelog=
 
;Version 10.0
* Updated: The default port has been changed from 8984 to 8080.
;Version 9.0
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu