SubjectPlus

For last one month was working on subjectplus installation, configuration and making site live.

It was challenging task.

Initially tried to install on Ubuntu 22.04 but the installation failed hence installed Ubuntu 16.04 but again there were few issues while using php5.6 as well as mysql 5.6.51 on Ubuntu 16.04 with proxy server configuration. Even after getting php5.6 there were issues with configuring http with https and several attempts were made to get subjectplus access through https but all attempts failed. Somehow was not getting 000-default.conf and 000-default-le-ssl.conf configured properly to open directly subjectplus page without apache index.html page.

Worked on several options and then followed following steps and now subjectplus is live with https and all php pages are as well displayed properly.

Downloaded Ubuntu 22.04 desktop iso

Installed php5.6 by adding repository sudo add-apt-repository ppa:ondrej/php and then installing all required php packages such as php5.6-gd, php5.6-xml, php5.6-mysql, php5.6-mbstring, php5.6-gettext, php5.6-json, php5.6-curl

Installed mysql 5.6.51 from mysql downloads repository https://downloads.mysql.com/archives/installer 

Installed apache2 and checked http://localhost page first then downloaded latest subjectplus installation file from https://github.com/subjectsplus/SubjectsPlus/releases/tag/v4.6 and untarred that file and kept in /var/www folder.

Created subjectplus database in mysql and changed ownership of /var/www/sp folder to www-data:www-data and restarted apache2 then completed web installation of subjectplus by following link http://localhost/sp/control 

edited 000-default.conf and marked it to /var/www by removing html and added following in 000-default.conf after checking everything working properly with http://example.com (real domain name) installed certbot and configured site with letsencrypt by carrying out following commands

sudo apt install certbot python3-certbot-apache

added servername and serveralias in 000-default.conf 

enabled ufw by running ufw enable 

sudo ufw allow 'Apache Full'

sudo ufw delete allow 'Apache'

certbot --apache -d example.com (replace example.com with real domain name)

added following lines in 000-default-le-ssl.conf 


even after doing this subjectplus was not showing all pages properly and then changed baseurl in /var/www/sp/control/include/config.php 

https://example.com/ 

edited .htaccess files in /subjects/.htaccess, /api/.htaccess and added RewriteBase to /

restarted apache2 and now site was automatically resolving with https even though https is added or not.

SubjectPlus installation took lot of time due to either configuration error on php/mysql/https.