Apache

CentOS7, ISPConfig3, and multiple PHP versions

in centos 7, PHP, PHP7, PHP56, ISPConfig, Apache, mariadb

Currently PHP developers face a great problem with PHP version - most OS repos already have outdated versions (CentOS has 5.4 which has passed its end of life!), but just swapping out versions is just not an option - especially with the version requirements of different frameworks / libraries. Furthermore, usually to have more than one version meant recompiling, and keeping up with updates - and no one wants that. Here's how to setup a server (virtual of physical), with ISPConfig3 hosting panel, multiple PHP versions, latest Apache and Mariadb in less than a half hour, with zero compiling. You can then manage your virtual hosts and their PHP version from a nice UI.

Read more »

XDebug your IDE

in xdebug, PHP, Linux, centos, Apache, phpstorm

With most languages, when you develop you get the (wonderfully helpful) option of setting breakpoints, stepping through your code, adding watches and inspecting the overall state at any specific point in time. PHP differs in that, being a scripted language hosted in another process (eg Apache) it normally doesn't offer that. Here's how to enable your IDE to do get all the nifty features.

Read more »

Protecting your cache folders

I spent the past few days in the VERY unpleasant situation where I had to remove tons of spam-sending scripts from a couple of websites I host. These were in relation to unsecured, unmaintained Joomla! installations, and exploited the cache folder. I won't bother you with the why or how, just know that the vulnerability existed, and has been fixed for versions 2.x and up -- NOT 1.x. Here's the simple way to secure yourself without changing the Joomla site code.

Read more »

Apache SSL certificate errors - wrong certificate

in Apache, ssl, vhosts, IE, windows xp

So you've configured Apache just like you want to. You've even added an SSL certificate to allow your users to securely navigate on your site. And you test it, and everything works, across all browsers you have access to... and you receive a dreaded call that there is a certificate error on a client (typically some higher up, because that is just your luck). What the hey?

Read more »

Scripting Apache virtual host creation

in Linux, Apache, bash, vhost

Virtual hosting is one of the most important things to happen in web hosting over the recent years. It allows a single IP to be associated with multiple websites. Though there are many panel solutions that offer virtual host management, it's nice to know what's going on and even better to actually be in control. The tradeoff is that small mistakes can cause all of your sites to go down until you fix them -- unless you automate.

Read more »

Setting up a LAMP stack on Debian

in Linux, PHP, Debian, MySQL, Apache

I just setup a development enviroment using Debian as my distro. I noted however that when using tasksel (the wizard during installation) to install an SQL server, I got PostgreSQL. Nothing personal with it, I just haven't used it much, and thus hate all the non-MySQL behaviour quirks it has. It just had to go.

Read more »