Category Archives: WebHosting

Accessing a HostGator SVN repository via SVN+SSH on Windows

Accessing a HostGator SVN repository via SVN+SSH on Windows
This information should be helpful to anyone trying to access an svn repository stored on a remote (shared) server which does not expose an svn server.
My host is HostGator (good speeds, reliable ssh, cgi-only, MyISAM-only, decent support, non-existent knowledgebase). HostGator runs SSH over port 2222 which presents [...]

X-Content-Type-Options: nosniff header

Over the past two months, we’ve received significant community feedback that using a new attribute on the Content-Type header would create a deployment headache for server operators. To that end, we have converted this option into a full-fledged HTTP response header. Sending the new X-Content-Type-Options response header with the value nosniff will prevent Internet Explorer from MIME-sniffing a response away from the declared content-type.

For example, given the following HTTP-response:

HTTP/1.1 200 OK
Content-Length: 108
Date: Thu, 26 Jun 2008 22:06:28 GMT
Content-Type: text/plain;
X-Content-Type-Options: nosniff

This page renders as HTML source code (text) in IE8.

Proxy Authentication with Squid

Users will be authenticated if squid is configured to use proxy_auth ACLs.

Browsers send the user’s authentication credentials in the Authorization request header.

If Squid gets a request and the http_access rule list gets to a proxy_auth ACL, Squid looks for the Authorization header. If the header is present, Squid decodes it and extracts a username and password.

If the header is missing, Squid returns an HTTP reply with status 407 (Proxy Authentication Required). The user agent (browser) receives the 407 reply and then prompts the user to enter a name and password. The name and password are encoded, and sent in the Authorization header for subsequent requests to the proxy. Also see this example Authorization Header from .htaccess files.

NOTE: The name and password are encoded using “base64″ (See section 11.1 of RFC 2616). However, base64 is a binary-to-text encoding only, it does NOT encrypt the information it encodes. This means that the username and password are essentially “cleartext” between the browser and the proxy. Therefore, you probably should not use the same username and password that you would use for your account login.

The Camping Server for Apache + FastCGI

FastCGI .htaccess

This is a basic FastCGI .htaccess file. The last line is the most important.

AddHandler fastcgi-script .fcgi 

Options +FollowSymLinks +ExecCGI  

RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L]

Setup Zope behind Apache with SSL

Accessing CGI environment variables created by mod_ssl from within Plone
This way you will get HTTP_SSL_CLIENT_VERIFY, HTTP_SSL_CLIENT_S_DN_CN and HTTP_SSL_CLIENT_S_DN_Email environment variables in the request object.
Posted by mustapha
Problem:
You need to setup Zope behind Apache with SSL and you need to access some/all of the CGI environment variables set by the mod_ssl from within Plone. How to do [...]

Generate and User your own SSL Key in Apache

Do It Yourself SSL Guide
By Stephen Philbin
There are many people who want or need to have the connection between the browser and the Web server encrypted, but haven’t been able to set it up. This guide is intended to help people with the typical Apache on Linux setup to make encrypted connections available with [...]

.htaccess tutorial

Table of Contents
- Using Dynamic Control Files
- Global Dynamic Configuration File
- Local Dynamic Configuration Files
- Macro Expansion
- Directive Ordering
- Section Directives
- Wildcards and Extended Regular Expressions
- Nesting Section Directives
- The Section Directives
- Directory
- Location
- Files
- Limits
- RemoteIP
- RemoteHost
- Header Directives
- Header
- AddType
- ForceType
- Redirect
- Directory Listing Control Directives
- IndexIgnore
- Error Document Control
- ErrorDocument
- Access Control [...]

Firefox and Google speed up your site

Prefetching Hints – Helping Firefox and Google speed up your site

The Prefetching Problem
Wouldn’t it be better to download the next page we’ll want to click while we’re reading the one before? That’s the thinking behind prefetching, whether it’s done by the Firefox browser or the Google Web Accelerator. There’s been a lot of controversy [...]

DreamHost Employees shocked visitors to their website

This is why many of the worlds most-respected web developers and designers are flocking to dreamhost. That’s how I found it, thanks to 456bereastreet.com, and now I’m telling you.