Archive for Apache

suPHP and .phps PHP code highlighting support

Today a user on one of my web servers asked me why .phps files would only download and not show the highlighted PHP code as expected.

This is usually done by adding the following to your “httpd.conf”…

AddType ‘application/x-httpd-php-source’ .phps

We use the cPanel web hosting control panel and to improve security cPanel recommend using suPHP, which allows PHP scripts to run as a user rather than “nobody”.

This means that adding the above line to “httpd.conf” does not work with suPHP.

So what can be done?

Read the rest of this entry »

Comments (3)

Friendly URLs (revisited)

Turn dynamic URLs into friendly URLs

I’m sure we’re all familiar with URLs that look like this:

http://www.example.com/?nav=page

These type of URLs aren’t particularly “friendly”, they are known as dynamic URLs. As a rule of thumb search engines such as Google don’t like them as much as “static URLs”.

However, Google has recently released an article on this very subject entitled Dynamic URLs vs. static URLs, I recommend you give it a read so you fully understand what we’re talking about.

Read the rest of this entry »

Comments (3)

Configuring a FreeBSD IRC Shell Server

This is a brief guide created to help configure a secure FreeBSD as an IRC shell server.

In this case I will be running FreeBSD 6.0, with bash shell, SSHd, named (bind), httpd (Apache2+PHP4), FTPd (pure-ftpd). Read the rest of this entry »

Comments (7)

Creating subdomains from directories using mod_rewrite in Apache .htaccess

The idea was to have the ability to create unlimited subdomains simply by creating an appropreate directory for it in your html root directory.

Since most people don’t have direct access to their httpd.conf, the obvious solution was to create a method using mod_rewrite within “.htaccess”. This also allowed it to be setup very easily and quickly.

Read the rest of this entry »

Comments (8)

Focus on one domain

Why you should be focusing on one domain name for one site

Often you will find yourself buying a domain for your project (eg: example.com), however these days to secure the brand you have to buy all the associated domains (eg: example.net, example.org, example.co.uk, example.info, etc).

I then find that visitors will end up entering the sites at different points from different domains, depending on how they find it, or what they have been told.

Read the rest of this entry »

Comments (1)