Friday, February 14, 2020

Galaxy server setup: change to www.your.domain/galaxy



After deploying the local galaxy following the official guide at https://galaxyproject.org/admin/get-galaxy/, a few more steps can be done to hide the port (:8080) and change your galaxy site link to something like www.your.domain/galaxy.


1. Enable apache modules: proxy, proxy_http, and rewrite
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod rewrite
2. Add following lines to apache config file, e.g. /etc/apache2/sites-enabled/000-default.conf
RewriteEngine on
RewriteRule ^/galaxy$ /galaxy/ [R]
RewriteRule ^/galaxy(.*) http://localhost:8080$1 [P]
sudo systemctl restart apache2
Done!

PS:
One command to install LAMP server packages on Ubuntu Linux, including Apache, MySQL and PHP. Use the "^" at the end!
sudo apt install lamp-server^

No comments:

Post a Comment