JK Web Studio is a small web design studio, specializing in efficient and user friendly solutions.

Contact us at info@jkwebstudio.com

Archive for the ‘apache’ Category

Adding server side includes to JS and CSS files

Wednesday, October 7th, 2009

Add the following to apache.conf to use server side includes in JS and CSS files:

AddType application/javascript .js
AddOutputFilter INCLUDES .js
AddType text/css .css
AddOutputFilter INCLUDES .css


Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Order allow,deny
Allow from all

WAMP Setup

Tuesday, July 7th, 2009

Download and install the WampServer software.

Open up your HOSTS file. A typical place to look for it is in C:\Windows\System32\drivers\etc. If you are using Vista, make sure to open the file as administrator. Add IP address followed by host name. Example:

127.0.0.1 localjkwebstudio.com

Save HOSTS file

Open httpd.conf. Add the following code:

NameVirtualHost *

<Directory “C:/path/to/document/root”>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory “C:/path/to/files/outside/root/”>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *>
DocumentRoot “C:\path\to\document\root”
ServerName localjkwebstudio.com
Alias /img/ C:/path/to/files/outside/root/
</VirtualHost>

Restart server

Serve PHP from file types

Thursday, December 13th, 2007

Serving PHP code from files with different file extensions is quite easy to do on Apache. Simply add the following to you httpd.conf:

AddType application/x-httpd-php .html

All your .html files will now be served as php.

Kudos to Sectorlink

Friday, November 30th, 2007

I’ve been recommending Sectorlink as a reliable and friendly web host to all my clients for years now. Of course it doesn’t hurt that they’re also very price competitive…

It wasn’t until earlier this year, when I registered jkwebstudio.com, that I started using Sectorlink myself. I’ve been lucky enough to have an arrangement with a former employer about about hosting my other domains. But this time I signed up with Sectorlink, and I have been very happy so far. Especially the customer service is simply outstanding.

Just take my latest two issues.

A few weeks ago I started looking into using CGI for uploading files. My current solution uses PHP, but PHP has a built in limitation on file sizes that prevents anything larger than 2 MB uploads. I’d never written CGI scripts before, so I was having some beginner problems. I opened a technical support ticket with Sectorlink, and within hours they provided me with a working “Hello World” script to get me started down the CGI path.

Today I had another great experience with customer support. For some reason my php upload scripts did no longer work. I think this was caused by Sectorlink’s switch to no longer supporting PHP4, resulting in my account running in safe mode. After notifying Sectorlink about this, it took less than 20 mins for it to be resolved.

So I’ll keep recommending Sectorlink. They are fast and responsive, and in case you’re wondering, no, I’m not in any way affiliated with them.

more apache setup

Saturday, July 28th, 2007

As a follow-up to my previous post about setting up apache, php and mysql on windows vista, here are some useful links:

Setting Up Multiple Apache Local Web Sites On Your Computer

Changing your hosts file in Vista

Installing Apache, MySQL and PHP on Windows Vista

Tuesday, July 17th, 2007

When installing Apache, MySQL and PHP on Windows Vista, remember to disable User Account Control:

  1. Run MSCONFIG from the run/search menu.
  2. Select the Tools tab.
  3. Select Disable UAC and press Launch
  4. Restart computer

Instead of installing Apache, MySQL and PHP separately, I ended up installing the WAMP Server, which went very smoothly. You may have to restart your computer one more time before PHP sees your MySQL server.