Sub URI installation / Fasta Download not working

I am trying to run multiple Sequenceserver instances on one server. Each should ideally be reachable through something like: example.com/sequenceserver1

It is working so far but I have a problem with the databases. The configuration seems to work but somehow I cannot get the second instance of Sequenceserver too use its own databases even though it is specified in the config files.

I have just copied the first Sequenceserver folder from the ruby gem directory and renamed it, might that be the culprit?

I can Blast but as soon as I want to download the the Fasta file I am getting the following error:

ArgumentError - Database id should be one of: 58a08005fea95dd5499fac54e4b4d69e

Also I am not sure if I did the apache config right here is what I did so far:

<VirtualHost *:80>
#Server config
ServerName blast.naturkundemuseum.berlin:4567
DocumentRoot /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.8/public

Allow access to URI space

#RackBaseURI /frog
<Directory /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.8>
Allow from all
AllowOverride All
Options -MultiViews
#For Apache >= 2.4
Require all granted

#Shrimp-Blast start

Allow access to Rails app’s public files

that are outside of URI space

Alias /shrimp /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.8-shrimp/public

Run Rails app from /subdirectory

<Location /shrimp>
PassengerBaseURI /shrimp
PassengerAppRoot /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.8-shrimp

Additional rules for files in the public directory of Rails app

<Directory /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.8-shrimp/public>
Allow from all
Options -MultiViews
#For Apache >= 2.4
Require all granted
PassengerFriendlyErrorPages on

Last but not least the symlinks: I have tried a lot and unlinked everything back again in order to find out what might cause the confusion.

Thank you so much for your help, I really tried to fix this one myself but I am stuck!

Cheers

Tino

Hi,

Setting up two SequenceServer instances can be a little tricky. I think you got quite far :).

Have you read our writeup on Apache integration here - http://www.sequenceserver.com/doc/#apache. Edit config.ru in both the directories, as per the writeup, to point them to two different configuration files, one each for shrimp and frog. Set database dir in each config file to the correct directories. Restart Apache. And you should be good to go. (Only one database dir can be specified per config file.)

That should also take care of the error you get when downloading FASTA.

Priyam

Thank you so much for your help. I have had edited both the config.ru files previously. They were all pointing to a separate .sequenceserver.conf file. I have named them differently though: sequenceserver-shrimp.conf for example. They happily lived in my /root folder. Your answer gave me the idea to move them into separate folders in order to rename them sequenceserver.conf. Also I have changed the content according to the sequenceserver docs:

My previous configuration:

require ‘sequenceserver’

SequenceServer.init(:config_file => “/root/.sequenceserver-shrimp.conf”)
run SequenceServer

My current configuration:

require ‘sequenceserver’
SequenceServer::DOTDIR = “/root/sequenceserver-config/shrimp/.sequenceserver”
SequenceServer.init :config_file =>("/root/sequenceserver-config/shrimp/.sequenceserver.conf")
run SequenceServer

The problem that I am facing now is that sequenceserver cannot find any Database.

I am getting the following error (after restarting apache)

Any idea what I am doing wrong?

All the best and thanks again

Tino

I have heavily investigated the matter and I am stuck! Sequenceserver is running here:

https://blast.naturkundemuseum.berlin
and the second instance:
https://blast.naturkundemuseum.berlin/shrimp

Since they are displaying both the right databases I am quite sure that they must find their config files respectively. On the other hand just the second one faces the issue that the fasta file is not downloadable. I will test everything a bit more tomorrow but should neither sequenceserver instance find any database if the config.ru has an error?

Thank you very much for your help!

Tino

For all who are reading this, the solution to several Blast inastances was to change the Apache config. All Blast instances run fine for me if they are all set up as sub URI. Here is an Example of my working Apache Config (I am running CentOS but it should not matter):

`
<VirtualHost *:80>
#Server config
ServerName blast.naturkundemuseum.berlin:4567
DocumentRoot /var/www/html

Allow access to URI space

#RackBaseURI /frog
<Directory /var/www/html>
Allow from all
AllowOverride All
Options -MultiViews
#For Apache >= 2.4
Require all granted

#Frog-Blast start

Allow access to Rails app’s public files

that are outside of URI space

Alias /frog /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.9/public

Run Rails app from /subdirectory

<Location /frog>
PassengerBaseURI /frog
PassengerAppRoot /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.9
PassengerRuby /root/.rbenv/versions/2.2.2/bin/ruby

Additional rules for files in the public directory of Rails app

<Directory /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.9/public>
Allow from all
Options -MultiViews +Indexes +FollowSymLinks
#For Apache >= 2.4
Require all granted
PassengerFriendlyErrorPages on

#Shrimp-Blast start

Allow access to Rails app’s public files

that are outside of URI space

Alias /shrimp /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.9-shrimp/public

Run Rails app from /subdirectory

<Location /shrimp>
PassengerBaseURI /shrimp
PassengerAppRoot /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.9-shrimp
PassengerRuby /root/.rbenv/versions/2.2.2/bin/ruby

Additional rules for files in the public directory of Rails app

<Directory /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequenceserver-1.0.9-shrimp/public>
Allow from all
Options -MultiViews +Indexes +FollowSymLinks
#For Apache >= 2.4
Require all granted
PassengerFriendlyErrorPages on

Define default Passenger user

PassengerDefaultUser root
`

Hi Tino,

Thanks for sharing that. I didn’t know having each instance in a sub-uri was important. I have now updated the doc to say so (http://www.sequenceserver.com/doc/#apache). Thanks very much.

Priyam