Specify 7 running on a subdomain

Hi,
I’m trying to run the dockerized SP-7 on a subdomain (ex: https://mydomain.com/mysub/) rather than on the root domain (ex: https://mydomain.com).

However, the application is always redirecting my requests to the root domain. For example, when I do this request… https://mydomain.com/mysub/ I’m redirected to https://mydomain.com/specify/ rather than https://mydomain.com/mysub/specify/

This redirection to the root domain doesn’t seem to be executed by the nginx container.
If you have any suggestion, please let me know.
Thanks

Hi @Heryk,

Do you mind if I ask what the purpose of the subdirectory is? Are you trying to have one server have different instances of specify for people to use? If so, subdomains may be the solution, but sudomains would look like this:

https://subdomain.example.com

These work well, and is how specify cloud seperates out the different services on the specifycloud.org domain.

I don’t have as much experience configuring services that use the subdirectory approach, however there are some services that do work with that method. The one that comes to mind is mkdocs, in which the base url is configured as an environment variable, which can included a path. GitHub pages also seperates out different repositories within a organization through subdirectories, since it has already split up github.io subdomains among organizations/users.

I don’t think that subdirectories would work as well in specify due to how the urls are setup. For example, the specify route and favicons are coded as an absolute path, which I believe explains why you are experiencing the redirection the way you are.

1 Like

That’s correct—Specify 7 does not support the use of a subdirectory in the base URL, but we do support subdomains.

@Heryk – is that a viable option in your case?

1 Like

Hi Mark and Grant,

I’ve received our new internal production server and will be migrating our SP-7 instances to it soon.

Our IT team suggested using a subdirectory structure for the setup, as it simplifies our internal domain management and SSL request process by requiring just one domain (ex: https://collections.cfs.nrcan.gc.ca) instead of several. For example:

However, after testing, it seems that SP-7’s URL structure isn’t compatible with this approach.

Thanks for your input on this. I’ll be reverting to the previous setup using subdomains:

Cheers

2 Likes