Update:
- Set up a test site with domain test2025.bioviz.org and IP address 3.213.193.166.
- Edited my /etc/hosts file on my local computer to point the domain to the above IP address with:
local aloraine$ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
3.213.193.166 test2024.bioviz.org
Made some edits to apache2 configuration file and tested with:
local aloraine$ curl -Iv https:* Trying 3.213.193.166:443...
* Connected to test2024.bioviz.org (3.213.193.166) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server accepted http/1.1
* Server certificate:
* subject: CN=*.bioviz.org
* start date: Jul 9 00:00:00 2024 GMT
* expire date: Aug 9 23:59:59 2025 GMT
* subjectAltName: host "test2024.bioviz.org" matched cert's "*.bioviz.org"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
* using HTTP/1.1
> HEAD /igb/releases/current/IGB_unix_current.sh HTTP/1.1
> Host: test2024.bioviz.org
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Fri, 06 Dec 2024 19:30:02 GMT
Date: Fri, 06 Dec 2024 19:30:02 GMT
< Server: Apache/2.4.52 (Ubuntu)
Server: Apache/2.4.52 (Ubuntu)
< Last-Modified: Fri, 06 Dec 2024 18:33:33 GMT
Last-Modified: Fri, 06 Dec 2024 18:33:33 GMT
< ETag: "bb8fcab-6289e4095ba09"
ETag: "bb8fcab-6289e4095ba09"
< Accept-Ranges: bytes
Accept-Ranges: bytes
< Content-Length: 196672683
Content-Length: 196672683
< Content-Disposition: attachment; filename="(null)"
Content-Disposition: attachment; filename="(null)"
< Content-Type: application/octet-stream
Content-Type: application/octet-stream
<
* Connection #0 to host test2024.bioviz.org left intact
Note that the content type is "Content-Type: application/octet-stream" and there is "Content-Disposition: attachment; filename="(null)"
Here is the code I added to /etc/apache2/sites-enabled/test2024.bioviz.org-ssl.conf on the test host for testing purposes only:
<FilesMatch "^(IGB_unix_current.sh)$">
ForceType application/octet-stream
Header set Content-Disposition 'attachment; filename="%{MATCH_FILENAME}e"'
</FilesMatch>
The MATCH_FILENAME syntax is an attempt to get matching file name as a environment variable - the "e" at the end of the variable name. I'm not sure if this value is getting set. I think it requires mod_env to work.
I simplified the above to:
<FilesMatch "^(IGB_unix_current.sh)$">
ForceType application/octet-stream
Header set Content-Disposition 'attachment; filename="IGB_unix_current.sh"'
</FilesMatch>
This caused the file to get downloaded to my computer when I accessed this URL: https://test2024.bioviz.org/igb/releases/current/IGB_unix_current.sh
However, I don't know if a Linux machine would run the file upon download, or not. This is what we want – for the installer program (a shell script) to run and install the IGB application bundled with the shell script into the correct locations on the user's computer.
Update: