A little about Vernon...

Hey there everybody, I’m Vernon. I’ve been a full-time freelance web designer since 2002 and can honestly say it’s been a great journey.

If you’re interested, take a look at my services site and let me help you with your project.

5

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

I’ve been setting up WordPress MU on a Plesk server and I have to tell you that getting the subdomains (e.g. blog2.domain.com) to work was driving me crazy.  It took a combination of multiple sites before I got it working, so I wanted to post what I did here hoping that it might help someone else.

First and foremost, you need to create the vhost.conf file for the domain itself.  The vhost.conf and vhost_ssl.conf file needs to be created in the conf directory of the domain.  On Plesk it should be similar to: /var/www/vhosts/domain.com/conf/vhost.conf.

You can create the file from within the Plesk panel itself or using an SSH client like Putty (my preference).

Within the vhost.conf file you need to include the following line:

ServerAlias *.domain.com

Replacing “domain.com” with your domain.

Once you’ve done that you’ll need to run the following from your SSH client (there’s other ways to do this but this worked fine for me):

/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=domain.com

Then restart apache and go try it out.  Guess what?  It’s supposed to work but it still doesn’t!

This is where the final magical step comes in.  Log in to your Plesk panel, go to domains, and select the domain that you are trying to set this up on.  Once the page loads, select DNS Settings.

From there, click the Add Record button from the top.

The Record Type should be CNAME.  In the “Enter domain name” field enter a *.  Then in the canonical name field enter your domain (without a www, just a plain domain.com).

Click Ok to save the record and try again.  You should now see your WordPress MU Subdomains on Plesk working!

Tags: , ,

0

So I'm working on a project where I want to show a formatted join date on a user profile page.  The join date, of course, is stored in a MySQL database using the datetime column type.  I know you can use the MySQL built in function DATE_FORMAT, but I wanted to be able to do this right in my PHP rather than in a query.

So here's an easy, one-line bit of code to give you a date in any format you choose using your datetime value from your database result:

PHP:
  1. $j = $result['datetimefield'];
  2. //this formatted date displays a Month Name and Year
  3. $formatted_date = date('F Y', mktime(substr($j, 11, 2), substr($j, 14, 2), substr($j, 17, 2), substr($j, 5, 2), substr($j, 8, 2), substr($j, 0, 4)));

Is this helpful for you?  Am I trying to roll a square wheel here and you know a better way?  Comment and let me know!

Tags: , , ,

2

I would bet solid money that most all freelance designers go through (or are currently going through) the "underpricing" dilemma.  At the time - generally when you don't have any work - it can seem like a grand idea.  Yet, once reality decides to invade the situation, you find yourself like most 9-5'ers... overworked and underpaid.

Steven Snell has a great article on The Costs of Under Pricing Your Design Services.  It's short enough for a quick read while touching on some crucial points when it comes to the costs of underpricing.

Tags: , ,