Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
268 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# This file derives from the file /etc/apache2/sites-available/default | ||
# in apache2 as installed in ubuntu 12.04. | ||
# | ||
# Now that we're supporting both HTTP and HTTPS, this file contains all the | ||
# shared configuration for VirtualHosts in 'opentree.conf' and 'opentree-ssl.conf'. See | ||
# http://serverfault.com/questions/83669/apache2-with-ssl-do-i-have-to-copy-virtualhost-blocks | ||
# | ||
# This file should be periodically reviewed as apache versions advance and | ||
# 'best practice' for virtual host configurations changes. | ||
|
||
ServerAdmin webmaster@localhost | ||
|
||
CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
|
||
# TEMPORARY REDIRECT to maintenance page | ||
#RedirectMatch 302 ^(.*)$ http://opentreeoflife.github.io/maintenance.html | ||
|
||
# See http://stackoverflow.com/questions/13216837/install-web2py-in-virtual-hosting | ||
# NOTE that we can only specify WSGIDaemonProcess once, so this has been | ||
# retained in the main HTTP configuration 'opentree.conf'! | ||
#WSGIDaemonProcess web2py user=opentree group=opentree display-name=%{GROUP} | ||
WSGIProcessGroup web2py | ||
WSGIScriptAlias / /home/opentree/web2py/wsgihandler.py | ||
|
||
# We don't want the scriptalias to override mappings for | ||
# treemachine and taxomachine... seems not to. | ||
|
||
<Directory /home/opentree/web2py> | ||
AllowOverride None | ||
Require all denied | ||
<Files wsgihandler.py> | ||
Require all granted | ||
</Files> | ||
</Directory> | ||
|
||
AliasMatch ^/([^/]+)/static/(.*) /home/opentree/web2py/applications/$1/static/$2 | ||
<Directory /home/opentree/web2py/applications/*/static/> | ||
Require all granted | ||
</Directory> | ||
|
||
# See https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-of-Life-APIs | ||
|
||
# 7474 = treemachine neo4j | ||
|
||
<Location /v2/tree_of_life> | ||
Require all granted | ||
ProxyPass http://localhost:7474/db/data/ext/tree_of_life/graphdb | ||
ProxyPassReverse http://localhost:7474/db/data/ext/tree_of_life/graphdb | ||
</Location> | ||
|
||
<Location /v2/graph> | ||
Require all granted | ||
ProxyPass http://localhost:7474/db/data/ext/graph/graphdb | ||
ProxyPassReverse http://localhost:7474/db/data/ext/graph/graphdb | ||
</Location> | ||
|
||
# 7476 = taxomachine neo4j | ||
|
||
<Location /v2/tnrs> | ||
Require all granted | ||
ProxyPass http://localhost:7476/db/data/ext/tnrs_v2/graphdb | ||
ProxyPassReverse http://localhost:7476/db/data/ext/tnrs_v2/graphdb | ||
</Location> | ||
|
||
<Location /v2/taxonomy> | ||
Require all granted | ||
ProxyPass http://localhost:7476/db/data/ext/taxonomy/graphdb | ||
ProxyPassReverse http://localhost:7476/db/data/ext/taxonomy/graphdb | ||
</Location> | ||
|
||
# 7478 = oti neo4j | ||
|
||
<Location /v2/studies> | ||
Require all granted | ||
ProxyPass http://localhost:7478/db/data/ext/studies/graphdb | ||
ProxyPassReverse http://localhost:7478/db/data/ext/studies/graphdb | ||
</Location> | ||
|
||
# phylesystem-api is provided via web2py | ||
RewriteEngine on | ||
RewriteRule ^/v2/study/(.*) /phylesystem/v1/study/$1 [PT] | ||
|
||
# ------------------------------------------------------------ | ||
# Explicit routing for /cached/* URLs (in phylesystem-api) | ||
|
||
RewriteEngine on | ||
RewriteRule ^/cached/(.*) /phylesystem/default/cached/$1 [PT] | ||
|
||
# ------------------------------------------------------------ | ||
# v1 API retained for transition period (ending Nov 2014 ?) | ||
|
||
<Location /treemachine/v1> | ||
Require all granted | ||
ProxyPass http://localhost:7474/db/data/ext/GoLS/graphdb | ||
ProxyPassReverse http://localhost:7474/db/data/ext/GoLS/graphdb | ||
</Location> | ||
|
||
<Location /treemachine/ext> | ||
Require all granted | ||
ProxyPass http://localhost:7474/db/data/ext | ||
</Location> | ||
|
||
<Location /taxomachine/v1> | ||
Require all granted | ||
ProxyPass http://localhost:7476/db/data/ext/TNRS/graphdb | ||
ProxyPassReverse http://localhost:7476/db/data/ext/TNRS/graphdb | ||
</Location> | ||
|
||
<Location /taxomachine/ext> | ||
Require all granted | ||
ProxyPass http://localhost:7476/db/data/ext | ||
</Location> | ||
|
||
<Location /oti/v1> | ||
Require all granted | ||
ProxyPass http://localhost:7478/db/data/ext/QueryServices/graphdb | ||
ProxyPassReverse http://localhost:7478/db/data/ext/QueryServices/graphdb | ||
</Location> | ||
|
||
<Location /oti/ext> | ||
Require all granted | ||
ProxyPass http://localhost:7478/db/data/ext | ||
</Location> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Adapting SSL settings (second VirtualHost) from /etc/apache2/sites-available/default-ssl | ||
# in apache2 as installed in ubuntu 12.04. | ||
# | ||
# We support both HTTP and HTTPS, with two separate files in sites-available. | ||
# This file holds only the settings unique to the HTTPS VirtualHost, with all | ||
# shared configuration included from 'apache-confog-shared'. See | ||
# http://serverfault.com/questions/83669/apache2-with-ssl-do-i-have-to-copy-virtualhost-blocks | ||
# | ||
# This file should be periodically reviewed as apache versions advance and | ||
# 'best practice' for virtual host configurations changes. | ||
|
||
<IfModule mod_ssl.c> | ||
<VirtualHost *:443> | ||
|
||
ErrorLog ${APACHE_LOG_DIR}/ssl_error.log | ||
|
||
# Possible values include: debug, info, notice, warn, error, crit, | ||
# alert, emerg. | ||
LogLevel warn | ||
|
||
SSLEngine on | ||
SSLCertificateFile /etc/ssl/certs/opentree/STAR_opentreeoflife_org.pem | ||
SSLCertificateChainFile /etc/ssl/certs/opentree/STAR_opentreeoflife_org.pem | ||
SSLCertificateKeyFile /etc/ssl/private/opentreeoflife.org.key | ||
|
||
# SSL Engine Options: | ||
<FilesMatch "\.(cgi|shtml|phtml|php)$"> | ||
SSLOptions +StdEnvVars | ||
</FilesMatch> | ||
<Directory /usr/lib/cgi-bin> | ||
SSLOptions +StdEnvVars | ||
</Directory> | ||
|
||
# OPENTREE SHARED CONFIGURATION | ||
Include /etc/apache2/opentree-shared.conf | ||
|
||
</VirtualHost> | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This file derives from the file /etc/apache2/sites-available/default | ||
# in apache2 as installed in ubuntu 12.04. | ||
# | ||
# We support both HTTP and HTTPS, with two separate files in sites-available. | ||
# This file holds only the settings unique to the HTTP VirtualHost, with all | ||
# shared configuration included from 'apache-confog-shared'. See | ||
# http://serverfault.com/questions/83669/apache2-with-ssl-do-i-have-to-copy-virtualhost-blocks | ||
# | ||
# This file should be periodically reviewed as apache versions advance and | ||
# 'best practice' for virtual host configurations changes. | ||
|
||
<VirtualHost *:80> | ||
|
||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
|
||
# Possible values include: debug, info, notice, warn, error, crit, | ||
# alert, emerg. | ||
LogLevel warn | ||
|
||
# Restrict web2py admin pages to admin users on localhost (SSH tunnel) | ||
# TODO: Should this apply to the HTTPS VirtualHost as well? | ||
<Location /admin> | ||
Require ip 127.0.0.1 | ||
</Location> | ||
<LocationMatch ^/([^/]+)/appadmin> | ||
Require ip 127.0.0.1 | ||
</LocationMatch> | ||
|
||
# See http://stackoverflow.com/questions/13216837/install-web2py-in-virtual-hosting | ||
# | ||
# NOTE that we can only specify WSGIDaemonProcess once, so this directive has been | ||
# retained in this file. All other WSGI directives are shared | ||
# across both vhosts | ||
WSGIDaemonProcess web2py user=opentree group=opentree display-name=%{GROUP} | ||
|
||
# OPENTREE SHARED CONFIGURATION | ||
Include /etc/apache2/opentree-shared.conf | ||
|
||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters