Internal Server Error 500 when trying to install JCE 2.2.6 in Joomla 2.5

When trying to install the JCE content editor for Joomla version 2.2.6 in Joomla 2.5 it failed with HTTP Error 500 Internal Server Error. Directory permissions was not a problem and there was no problem installing other extensions. 

Solution: 

  1. Download the JCE 2.2.6 zip archive to your computer.
  2. Unzip it to a local folder, called for example "jce"
  3. Upload the folder to your Joomla! tmp directory
  4. In the Joomla! backend, go to Extensions -> Manage extensions and go to the box for installation from a folder on the server.
  5. Enter the path where the uploaded folder containing JCE is uploaded, i.e. probably something like /var/www/mysitename/web/tmp/jce and click install.

 

 

Remove or add www to URL using Apache mod_rewrite

To avoid a website being considered as "duplicate content" by Google (i.e. the same website appearing under different URLs) it is a good idea to make sure the website doesnt appear as both http://www.example.com and http://example.com. This can be achieved by using the mod_rewrite in Apache using the .htaccess file.

To remove "www" from the URL, i.e. the website’s URL should be http://example.com, your .htaccess should look like this: 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^example\.com$
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

If you instead want to make sure "www" is added, i.e. the website’s URL should be http://www.example.com, your .htaccess should look like this: 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

 

postfix only listens on localhost (127.0.0.1)

On a newly installed VPS (Parallells Virtuozzo) running Ubuntu 12.04 LTS I also installed postfix as my MTA. However, it turned out that it only listened on localhost. I checked that "inet_interfaces = all" in main.cf and that my /etc/hosts was up to date with my server’s hostname. The reason was that the machine had sendmail preinstalled and running.

A netstat -an gives: 

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN

To the solution to this is: 

sudo /etc/init.d/sendmail stop
sudo update-rc.d -f sendmail remove
sudo /etc/init.d/postfix restart

Now netstat -anp show that postfix listens to all interfaces: 

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 691/master

 

Avoiding a SSH client connection to timeout

If you’re behind a firewall you sometimes run into a problem where the SSH client connection times out after a period of time (typically when going out for lunch leaving your SSH sessions logged in). The easiest way to solve this is by changing the configuration of the SSH client (it can also be fixed through the server config but since the problem often relates to the firewall protecting the client it is a better solution to fix this in the client). 

Just edit the file ./ssh/config and add the lines: 

Host *
ServerAliveInterval 30

The above assumes the firewall drops inactive connections at an interval > 30 seconds.