Articles

Various articles pertaining to web design and development


Piping Emails Through Your Invision Community Using Exim

With the plethora of great updates released and forthcoming from Invision Power Services, I thought it was about time to hop back into it with a new project. While setting up the Invision Community suite of products, I came across the option to pipe emails into the included support system (you’ll need the Commerce application

Changing the Port Number of vsftpd

Published — Category: Ubuntu.

By default, vsftpd (Very Secure FTP Daemon) utilizes port 21. To change this port is a fairly quick process. $ sudo nano /etc/vsftpd.conf In this file, find listen_port. If you can’t find it, add it in yourself. listen_port=202 Then restart vsftpd. $ sudo service vsftpd restart Make sure you allow this port to be used

Getting Vanilla Forums to Work on Nginx

# Rewrite to prettify Vanilla forum URLs location /forum { try_files $uri $uri/ @forum; } location @forum { rewrite ^/forum(.+)$ /forum/index.php?p=$1 last; } It’s that simple. Add that to your server block in Nginx, and change “forum” to where your Vanilla Forum is installed. $ sudo service nginx reload Don’t forget to open up conf/config.php

Displaying an External Link Icon Using CSS

Published — Category: CSS.

Letting your visitors know that a link leads away from the site they’re currently on can be a great practice to adopt. If you want to display a small icon at the end of every external link on your website, without having to add a class like “external” to your a hrefs, there’s another option

Creating a Custom CKEditor Button

Published — Category: General Web.

In CKEditor 4, the buttons on the toolbar are made up of various plugins, located in its /plugins/ folder. In our case, I needed to add a custom button that, when viewing the source, would look as such: <p class=”h2″>H2 Heading</p> It’s a bit of a strange use-case, but it’s for a website in which

Switching from using a Socket to TCP/IP in PHP-FPM

Published — Category: Ubuntu.

A couple of websites on our DigitalOcean VPS  have a great amount of traffic. Due to this traffic, I ran into the error below (edited for readability). [crit] connect() to unix:/var/run/php5-fpm.socket failed 2 No such file or directory This was because the amount of concurrent users was starting to get high. Instead of fiddling around

Fixing 504 Gateway Time Out (Nginx & PHP5-FPM)

Published — Category: Nginx, Ubuntu.

Since upgrading the server from Ubuntu 12.04 to 14.04 a couple of months ago, we ran into this problem: ‘lfd on obstance.com: High 5 minute load average alert‘. Because, during the upgrade, some files were replaced with newer versions such as PHP5-FPM’s php.ini file, not all of our server configurations were exactly as they had

“Excessive processes running under user”

Published — Category: Ubuntu.

Sometimes you’ll need to add certain packages to your Linux server, and CSF will sometimes send emails to make sure you can keep an eye on suspicious processes and activity. If you know something is not malicious, you can add it to the ignore file to stop receiving these emails. As an example, we recently

Don’t Use Javascript to Add Nofollow Relationships

Published — Category: SEO.

rel=”nofollow” Great for SEO if you use it correctly. But please don’t use Javascript/jQuery to add this rel to your external links. It simply won’t do anything, as most search engine bots don’t parse JS on your site. Using PHPs preg_replace would actually allow bots to see this relationship on your links. Google actually does

Changing the Viewport Height When Link-Jumping

Published — Category: CSS.

When clicking on a #link that jumps to a particular part of a page, sometimes we need to take into account the viewport. If we have a fixed header, say 80px in height, our content will be overlapped by the header. To fix this, we can use some CSS magic: .jump_link:before { height: 80px; /*