The Fedora web-application supports several deploy-time, system-level configuration options. These configuration elements are set via the definition of System Propertiescan be set using a properties file or through system properties.
...
Code Block |
---|
set CATALINA_OPTS=%CATALINA_OPTS% -Dfcrepo.home=/mnt/fedora-data |
Reverse Proxy
If you have a reverse proxy for serving HTTPS that uses Tomcat's HTTP port, you will also need to set up a RemoteIPValve in your server.xml in order for Tomcat to rewrite links with HTTPS.
To do this you will first need to make sure the X-Forwarded-Proto header is set in your server config (example with Apache):
No Format |
---|
<VirtualHost *:443>
RequestHeader set X-Forwarded-Proto "https"
ServerName dummy-host.example.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/localhost.crt
SSLCertificateKeyFile /etc/ssl/private/localhost.key
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
DocumentRoot "/opt/fedora/apache-tomcat-8.5.66/webapps/fcrepo-webapp"
</VirtualHost>
|
Then you will need to add a Valve to the localhost Engine in Tomcat's server.xml:
No Format |
---|
<Valve className="org.apache.catalina.valves.RemoteIpValve"
protocolHeader="X-Forwarded-Proto" /> |
Jetty 9
On Debian Linux systems, one way of setting System Properties is to update the following file:
...
Code Block |
---|
mvn -Dfcrepo.home=/mnt/fedora-data jetty:run |
One-Click Run
One option is to use the "one click" application, which comes with an embedded Jetty servlet. This can be optionally built by running:
Code Block |
---|
mvn install -pl fcrepo-webapp -P one-click |
...
Code Block |
---|
java -jar ./fcrepo-webapp/target/fcrepo-webapp-<version>-jetty-console.jar |
...
Code Block |
---|
java -Dfcrepo.home=/data/fedora-home -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar |