PHP Applications & CMS Setup
- How to Install Redmine
- How to redirect my Joomla! site HTTP to HTTPS?
- Joomla 1.5 and MariaDb – Collation problem
How to Install Redmine
- Create database and a database user
- The next step navigate cPanel interface in the
Setup Ruby Appmenu, and select the Ruby version (2.1), and setup the application folder, and type the app URI. The URI can’t contain any special chatacters example (“/” “.” “,” etc,). When you fill all datas, please click the Setup button. - Then install the neccessary Ruby on Rails application modules. In the modules row click the show label. It may get informed about the full module list in the system requirements of an application. The setup may take up longer shorter time (in Redmine case this his testing 07:48.96 were minutes)
Installing the following Redmine modules:
- bundle
- i18n#0.6.11
- builder#3.0.4
- rails#3.2.19
- mime-types#1.25.1
- mocha#1.0.0
- jquery-rails#3.1.2
- coderay
- fastercsv
- request_store
- rbpdf
- mysql2
- selenium-webdriver
- rmagick
- shoulda#3.3.2
- ruby-openid#2.3.0
- request_store#1.0.5
- capybara#2.1.0
- net-ldap#0.3.1
- rack-openid
- shoulda-matchers#1.4.1
- redcarpet#2.3.0
- yard
- rake#10.4.2
- bigdecimal
- Type the module name and click the Add button. If we add all neccessary mudules click the Update button in the top of the page Then the installer compile and installing the modules, please wait to be patient, if the proccess complete we get a following message:
Extensions set successfully updated. - click the Restart button.
- Then download the Redmine package in SSH:
wget url http://www.redmine.org/releases/redmine-x.x.x.tar.gz - Then extract it:
tar xzf redmine-x.x.x.tar.gz - In the next step copy the content ind the earlier created folder
cp -R ~/redmine-x.x.x/* ~/redmine - Copy or rename the database.yml, and fill up the mySQL connectios details, then save it.
cp ~/redmine/config/database.yml.example ~/redmine/config/database.ymlnano ~/redmine/config/database.yml - The copy the public folder in to the /public_html/redmine/ folder.
cp -R ~/redmine/public/* ~/public_html/redmine/ - Enter the Redmine folder.
cd ~/public_html/redmine - Rename the htaccess.fcgi.example, and dispatch.fcgi.example files.
cat htaccess.fcgi.example >> .htaccesscp dispatch.fcgi.example dispatch.fcgi - Then go back to the extract the Redmine
cd ~/redmine - Add the next line in
Gemfilefile:gem "bigdecimal" - Run the following command:
Activate:source ~/rubyvenv/redmine/2.1/bin/activateInstall:
~/rubyvenv/redmine/2.1/bin/bundle installGenerating the Secret key:
~/rubyvenv/redmine/2.1/bin/rake generate_secret_tokenLoad the database:
RAILS_ENV=production ~/rubyvenv/redmine/2.1/bin/rake db:migrateInstall the sample data:
RAILS_ENV=production ~/rubyvenv/redmine/2.1/bin/rake redmine:load_default_data - The final step restart the application in cPanel.
How to redirect my Joomla! site HTTP to HTTPS?
- Checklist for your set up
To get SSL Certificate enabled for your Joomla site, you should have these followings in advance.
SSL Certificate, which has been installed successfully on your server. You can learn about how to get SSL Certificate HERE.
Your dedicated IP Address, which is unique for one SSL Certificate.Enable Force SSL in your Joomla site
Configure your configuration.php file
Open your configuration.php file
Find the following line:
var $live_site ='';Replace with:
var $live_site = 'https://www.your-domain.com';Next, open .htaccess file then add the following code to the bottom of the file.
RewriteEngine On RewriteCond %{HTTPS} OFF RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} - enable Force SSL in your Joomla site
In the Admin Panel, navigate through System >> Global Configuration or simply click the Global Configuration button.
Within the Server tab, in the Server Settings section, there are 3 Force SSL alternatives that you can select, namely:
- None: SSL will not be enabled in your Joomla site.
- Administrator Only: connections to your administrator will be on HTTPS.
- Entire Site: connections all over your website will be on HTTPS.
Joomla 1.5 and MariaDb – Collation problem
We found the hard way that all Joomla 1.5 ( yes there are still joomla 1.5 ) have problem with the collation of the database when you use UTF 8 characters . After several experiments with collation we found in some blogs that the anwer is pretty easy. You have to change a line in the mysqli file in Joomla.
in libraries/joomla/database/database/mysql.php
or (depending on your setting)
libraries/joomla/database/database/mysqli.php
comment the line 186
return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));
and add this instead (assuming these days you’ll have unicode supported database):
return 1;
the code looks like:
function hasUTF()
{
$verParts = explode( ‘.’, $this->getVersion() );
// return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));
return (1);
}