Skip to content

Commit

Permalink
Replace JavaScript / redirect with proper server redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlul committed Jun 3, 2022
1 parent e85c179 commit 7418d6d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 43 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ RUN curl -Lo /usr/local/bin/faToTwoBit https://hgdownload.soe.ucsc.edu/admin/exe
COPY config-template /var/www/html/config
WORKDIR /var/www/html
RUN echo -e "classicMenu = true\ninclude += data/datasets.conf\n\n[aboutThisBrowser]\ntitle = FORCAST" >> jbrowse/jbrowse.conf
RUN a2enmod rewrite
CMD service mongodb start && exec apache2-foreground
1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ services:
- ./jbrowse/plugins/ColorByCDS:/var/www/html/jbrowse/plugins/ColorByCDS
- ./jbrowse/plugins/ExportSequence:/var/www/html/jbrowse/plugins/ExportSequence
- ./crispr-icon.png:/var/www/html/crispr-icon.png
- ./index.html:/var/www/html/index.html
- mongodb:/var/lib/mongodb
volumes:
mongodb:
Expand Down
3 changes: 0 additions & 3 deletions index.html

This file was deleted.

82 changes: 43 additions & 39 deletions sites-enabled/000-default.conf
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf

# FORCAST modification from base configuration
<Directory "/var/www/html">
Options +ExecCGI
AddHandler cgi-script .py
Require all granted
</Directory>
# End modification
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf

# FORCAST modification from base configuration
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) /src/landing-page/ [R=301,L]

<Directory "/var/www/html">
Options +ExecCGI
AddHandler cgi-script .py
Require all granted
</Directory>
# End modification
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

0 comments on commit 7418d6d

Please sign in to comment.