digitalmethodsinitiative / dmi-tcat

Digital Methods Initiative - Twitter Capture and Analysis Toolset
Apache License 2.0
367 stars 114 forks source link

Installation script: mydomain.org/dmi-tcat? #297

Closed supersambo closed 6 years ago

supersambo commented 6 years ago

Hi, I haven't used tcat in quite some time, but I'm now I'm happy to see how this project has evolved in the meantime! I'd like to set up a new instance of tcat on a server and I'd like to use your the installation script this time. The server I'm using is a completely new ubuntu 16.04 machine, however it is not going to be used only for tcat, but it's going to host other things too. This is why I'd prefer not to install tcat on the main domain but rather on something like mydomain.org/dmi-tcat.

Not sure how to proceed: Can I still use the installation script somehow (I don't see any BASE_URL variable in the script and Servername has to be be pingable)? Or would you recommend me to go the manual way?

Thanks!

Best, stephan

dentoir commented 6 years ago

Hi @supersambo

My approach would be to use the auto-installer and afterwards modify the BASE_URL config.php variable and edit the appropriate files under /etc/apache2/sites-enabled - there should be only one or two lines there (ServerName and Directory related) you will need to modify. You don't need to modify/rename the installation directory itself, it can just stay at /var/www/dmi-tcat

Best,

Emile

supersambo commented 6 years ago

Hi @dentoir , thanks for your quick reply, I'm aware that this is actually more of a general webadmin question. I did as you suggested and installed tcat using the installation script, which btw. works great!

After changing the BASE_URL variable in config.php I played arround quite some time with the tcat.conf in apaches sites-available. Finally I came up with the following which appears to be working...

I changed this:

DocumentRoot "/var/www/dmi-tcat"        

RewriteEngine On
RewriteRule ^/$ /analysis/ [R,L]

to this:

Alias /dmi-tcat /var/www/dmi-tcat/
RedirectMatch "^/dmi-tcat/$" "/dmi-tcat/analysis/"

Alias apparently overrules the rewriteEngine so I had to change this to RedirectMatch. As said above, this seems to be working. Not sure if this will cause any other problems, however. Do you see any obvious issues with that!

Best, stephan

dentoir commented 6 years ago

Looks okay from the surface of it, if you can use the analysis modules and export data you should be fine.

supersambo commented 6 years ago

yes exporting works! thanks!