-
Notifications
You must be signed in to change notification settings - Fork 5
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
3 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
85 changes: 85 additions & 0 deletions
85
examples/webgl-timemachine/example-configs/earthtime-apache-vhost.conf
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,85 @@ | ||
# Example apache configuration, for EarthTime website serving | ||
# | ||
# To install, | ||
# | ||
# 1. Copy file and customize paths | ||
# | ||
# 2. Symlink into /etc/apache2/sites-enabled | ||
# | ||
# 3. Restart apache: | ||
# | ||
# sudo apachectl graceful | ||
# | ||
|
||
Define ROOTPATH /t/tm4.earthtime.org | ||
|
||
<VirtualHost *:80> | ||
ServerName tm4.earthtime.org | ||
ServerAlias www.tm4.earthtime.org | ||
DocumentRoot ${ROOTPATH}/app/data-visualization-tools/examples/webgl-timemachine | ||
Options FollowSymLinks | ||
Alias "/timemachine" "${ROOTPATH}/app/data-visualization-tools/timemachine" | ||
Alias "/js" "${ROOTPATH}/app/data-visualization-tools/js" | ||
Alias "/css" "${ROOTPATH}/app/data-visualization-tools/css" | ||
Alias "/images" "${ROOTPATH}/app/data-visualization-tools/images" | ||
Alias "/extras" "${ROOTPATH}/app/extras" | ||
Alias "/info" "${ROOTPATH}/app/data-visualization-tools/info.html" | ||
|
||
Header always set Access-Control-Allow-Origin "*" | ||
Header set Cache-Control "max-age=60, public, must-revalidate" | ||
|
||
<Directory "${ROOTPATH}/app"> | ||
AddOutputFilterByType DEFLATE application/octet-stream | ||
AddOutputFilterByType DEFLATE application/json | ||
AddOutputFilterByType DEFLATE text/plain | ||
AddOutputFilterByType DEFLATE text/html | ||
AddOutputFilterByType DEFLATE text/xml | ||
AddOutputFilterByType DEFLATE text/css | ||
AddOutputFilterByType DEFLATE application/xml | ||
AddOutputFilterByType DEFLATE application/xhtml+xml | ||
AddOutputFilterByType DEFLATE application/rss+xml | ||
AddOutputFilterByType DEFLATE application/javascript | ||
AddOutputFilterByType DEFLATE application/x-javascript | ||
|
||
Order Deny,Allow | ||
Allow from all | ||
Satisfy any | ||
</Directory> | ||
|
||
RewriteEngine on | ||
|
||
# LANDING PAGE | ||
RewriteRule "^/index.html$" "/landing/index.html" [PT] | ||
|
||
# EXPLORE PAGE | ||
RewriteRule "^/explore$" "/index.html" [PT] | ||
|
||
# INTERACTIVE STORIES | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_URI} !^.*\.(jpg|css|js|gif|png|json|geojson|svg|html)$ [NC] | ||
RewriteRule "^/stories/(.+)$" "/index.html" [PT] | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_URI} ^/stories/(.*)\.(jpg|css|js|gif|png|json|geojson|svg|html)$ [NC] | ||
RewriteRule "^/stories/(.*)\.(jpg|css|js|gif|png|json|geojson|svg|html)$" "/$1\.$2" [PT] | ||
|
||
# CAPTIVE STORIES | ||
RewriteRule "^/m/stories/(.+)\.(js|css)" "/stories/$1\.$2" [PT] | ||
RewriteRule "^/m/stories/status$" "/stories/status/index.html" [PT] | ||
RewriteRule "^/m/stories/status/(.*)$" "/stories/status/index.html" [PT] | ||
RewriteCond %{REQUEST_URI} !status.* | ||
RewriteRule "^/m/stories/(.+)$" "/stories/index.html" [PT] | ||
RewriteRule "^/m/config-local.js$" "/config-local.js" [PT] | ||
|
||
# EXAMPLE EMBEDS | ||
RewriteRule "^/embedding/?$" "/stories/example-embeds/examples.html" [PT] | ||
RewriteRule "^/embedding/mobile-embed-fullscreen-example/?$" "/stories/example-embeds/mobile-embed-fullscreen.html" [PT] | ||
RewriteRule "^/embedding/mobile-embed-inline-example/?$" "/stories/example-embeds/mobile-embed-inline.html" [PT] | ||
RewriteRule "^/embedding/mobile-embed-fullscreen-iframe-example/?$" "/stories/example-embeds/mobile-embed-fullscreen-iframe.html" [PT] | ||
RewriteRule "^/embedding/interactive-embed-fullscreen-iframe-example/?$" "/stories/example-embeds/interactive-embed-fullscreen-iframe.html" [PT] | ||
|
||
# Change path into path.html (only if path doesn't exist) | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^([^\.]+)$ $1.html [NC,L] | ||
</VirtualHost> |
31 changes: 31 additions & 0 deletions
31
examples/webgl-timemachine/example-configs/earthtime-data-apache-vhost.conf
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,31 @@ | ||
# Example apache configuration, for EarthTime tile data serving | ||
# | ||
# To install, | ||
# | ||
# 1. Copy file and customize paths | ||
# | ||
# 2. Symlink into /etc/apache2/sites-enabled | ||
# | ||
# 3. Restart apache: | ||
# | ||
# sudo apachectl graceful | ||
# | ||
|
||
Define ROOTPATH /t/tm4.earthtime.org | ||
|
||
<VirtualHost *:80> | ||
ServerName tm4.tiles.earthtime.org | ||
DocumentRoot ${ROOTPATH}/app/data | ||
Options FollowSymLinks | ||
|
||
Header always set Access-Control-Allow-Origin "*" | ||
|
||
<Directory "${ROOTPATH}/app/data"> | ||
AddOutputFilterByType DEFLATE application/octet-stream | ||
AddOutputFilterByType DEFLATE application/json | ||
AddOutputFilterByType DEFLATE text/csv | ||
|
||
AllowOverride None | ||
Require all granted | ||
</Directory> | ||
</VirtualHost> |
47 changes: 47 additions & 0 deletions
47
examples/webgl-timemachine/example-configs/earthtime-headless-apache-vhost.conf
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,47 @@ | ||
# Example apache configuration, for EarthTime website headless serving | ||
# | ||
# To install, | ||
# | ||
# 1. Copy file and customize paths | ||
# | ||
# 2. Symlink into /etc/apache2/sites-enabled | ||
# | ||
# 3. Restart apache: | ||
# | ||
# sudo apachectl graceful | ||
# | ||
|
||
Define ROOTPATH /t/tm4.earthtime.org | ||
|
||
<VirtualHost *:80> | ||
ServerName tm4.headless.earthtime.org | ||
DocumentRoot ${ROOTPATH}/app/data-visualization-tools/examples/webgl-timemachine | ||
Options FollowSymLinks | ||
Alias "/timemachine" "${ROOTPATH}/app/data-visualization-tools/timemachine" | ||
Alias "/js" "${ROOTPATH}/app/data-visualization-tools/js" | ||
Alias "/css" "${ROOTPATH}/app/data-visualization-tools/css" | ||
Alias "/images" "${ROOTPATH}/app/data-visualization-tools/images" | ||
Alias "/extras" "${ROOTPATH}/app/extras" | ||
Alias "/info" "${ROOTPATH}/app/data-visualization-tools/info.html" | ||
|
||
Header always set Access-Control-Allow-Origin "*" | ||
Header set Cache-Control "max-age=60, public, must-revalidate" | ||
|
||
<Directory "${ROOTPATH}/app"> | ||
AddOutputFilterByType DEFLATE application/octet-stream | ||
|
||
Order Deny,Allow | ||
Allow from all | ||
Satisfy any | ||
</Directory> | ||
|
||
RewriteEngine on | ||
|
||
# Use own config-local.js | ||
RewriteRule "^/config-local.js" "${ROOTPATH}/app/data-visualization-tools/examples/webgl-timemachine/config-local-headless.js" | ||
|
||
# Change path into path.html (only if path doesn't exist) | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^([^\.]+)$ $1.html [NC,L] | ||
</VirtualHost> |