Apache: page 1
There are a number of things you can do to make a server more secure whilst protecting your hosted entities and their users. Here are just three of the many things I do on every new server I commission. I hasten to add that these are not necessarily the most effective or at the top of my list - they are just that: 3 things I set on new servers. Read more ⇒
Force URLs to lowercase with Apache rewrite and PHP
Canonical pages are an important aspect of maintaining a website and ensure that search engine rankings are not affected by any duplicated content. In *NIX based systems file names with varying capitalisation are treated as separate files. For example filename.txt is not the same file as FileName.TXT. This extends into the world of Apache where URLs are also case sensitive. So that means that we really should pick a case for our URLs and force all browsers to redirect to our chosen scheme. Read more ⇒
Gearman, PHP and mod_gearman_status on Ubuntu
Installing Gearman is pretty easy as there are packages for it in Ubuntu: sudo apt-get install gearman libgearman-dev The development headers (libgearman-dev) are only required if you need to compile a library for your programming language such as a PHP extension. To install the PHP module you would run: sudo pecl install channel://pecl.php.net/gearman-0.7.0 If you have trouble with the above step then it is probably because you are running an older version of Ubuntu. Read more ⇒
An Excellent Development Server for a Team of Developers
Introduction When working in a team it is very useful to have a central web server with multiple environments and a configuration as close to the live server as possible. This can be a bit of a nightmare though if you need to setup a new VirtualHost container in Apache every time a new project is brought on or when a developer wants to work on a version of the site in their own environment. Read more ⇒
Plesk and its custom configuration files
Plesk allows you to control settings for each domains virtual host container (subdomains are also configured in the same way). To override the default configuration you will need to make the new vhost file, which should appear in the following locations: domain/conf/vhost.conf domain/subdomain/conf/vhost.conf The vhost.conf file must not contain the entire vhost container but only its contents. So this means that you cannot make changes to the IP address or port the virtual host container is listening on in this file, but you can override the PHP open_basedir setting and other directory settings. Read more ⇒
Memcached and APC: Two Simple Techniques to Speed up your PHP Webpages
Memcached and APC are two tools that you can install on your server and gain almost instant gratification! APC basically caches executions that you send to a PHP process so that the next time you ask the parser to run your script it only has to look for some pre-chewed opcode in memory rather than parsing your PHP from the disk. APC also has another feature up its sleeve, memory object caching, which allows you to store objects such as results from a database table in memory. Read more ⇒
Installing APC and Memcached for PHP Sessions on Ubuntu and Debi…
Installing APC on Debian or Ubuntu is as simple as: **user@server:/directory/$** sudo apt-get install php-apc Now let us reboot the Apache process to enable our new cache: **user@server:/directory/$** sudo /etc/init.d/apache2 restart APC should now be ready to run on your server. Try running the following command to verify it is setup; you should get something in response like mine: **user@server:/directory/$** php -r ‘phpinfo();’ | grep ‘apc’ apc MMAP File Mask => /tmp/apc. Read more ⇒
Using phing for good - Unfuddle Add Repository and SVN Import Ta…
As you may be aware I have recently been playing with the excellent Agavi framework and it introduced me to the interesting phing tool. Phing can be used to automate tasks with build files that are close to interoperable with Apache Ant, which uses XML files to configure builds. The advantage phing has for us PHP users is that it is entirely written in PHP so extending it is as simple as adding a new class. Read more ⇒
A Good Windows Development Environment and Ubuntu Virtualbox
Often Linux just does it better! Often I find myself developing a Windows machine without access to a Linux development server, but I still need to access to some of the Linux binaries and features such as cron jobs, the at command and binaries such as imagemagick, pdftotext, etc. Some things can be emulated with ported binaries or through Cygwin, but I feel a lot more comfortable developing on a platform that is representative of the live server the web site will run on. Read more ⇒
Enabling sites and modules in Apache on Ubuntu or Debian
I really like the way the Apache modules and virtualhosts are seperated out on Debian into folders containing those, which are available and those which are enabled. There is one small problem with this – it is more work than before! Luckily there are some helper scripts. The Apache configuration files are layed out in the following way: mods-available – the actual text files containing the modules configuration sites-available – the vhosts text file for the site Read more ⇒