Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in Web

Disabling directory indexing with Apache

webOct 16, 2005 1 min read

If you have visited a website and been greeted with a list of files instead of a webpage, the web server is configured to use directory indexes. Directory indexes can be helpful for users who need to locate unknown files, but pose a considerable security threat, and are often used by unscrupulous individuals to locate sensitive data (e.g., passwords, quicken files, product designs, etc.). Due to the security issues associated with directory indexes, I prefer to disable them on the Apache web servers I support. This is easily accomplished by negating the "Indexes" option in the httpd.conf Directory and Location stanzas, or by overriding the Indexes option in an .htaccess file: If an .htaccess file is used to override the web server directory indexing default configuration, the web server will need to be configured to allow overrides…

$ read more →

Wordpress themes

webSep 11, 2005 1 min

One of my favorite features in wordpress is theme support. Themes can be used to change the look and feel of a site, and are easily installed by extracting the theme in the ${BLOG_HOME}/wp-content/themes directory, and selecting the theme in the wordpress admin console. I am currently using theBack in Black theme, which has a mellow relaxing layout.

$ read more →

Fixing wordpress blunder

webSep 9, 2005 2 min

While messing around with the URL configuration values in wordpress, I managed to kill my theme and the administrative screens. This unfortunate series of events forced me to call technical support (Clay), who quickly forwarded me one of his blog posts for a fix. I followed Clay's directions, but inadvertently updated all 72 entries in the wp_config table with the following SQL DML statements: Since my BLOG immediately died after this update statement, I started to investigate the layout of the wordpress tables to see how to best recover from this snafu. A quick check of the matty mysql database revealed the following tables: Since I didn't have a backup* of the wp_config table, I couldn't just use the SQL TRUNCATE, DROP, CREATE and INSERT statements to remove the table and re-create it…

$ read more →

Apache Name-based virtual hosts

webFeb 22, 2005 1 min

Name-based virtual hosts allow a web server to host multiple domain names ( , mail.daemons.net, blatch.daemons.net) from one IP address. This allows a web hosting infrastructure to conserve IP address space, and simplify namespace management. Apache name-based virtual hosts are configured with the "NameVirtualHost" and "VirtualHost" directives, and rely on the HTTP "Host:" header attribute. This attribute is required in HTTP 1.1, and should be present with every request…

$ read more →

Apache HTTP to HTTPS redirects

webFeb 18, 2005 1 min

The Apache web server provides a flexible and customizable web hosting environment, and contains a plethora of features. One nice feature is the ability to redirect clients to different areas of a site based on URL location, or the port they are connecting to. Redirection is accomplished with the "Redirect" and "RedirectMatch" directives, which are part of the mod_alias module. To redirect all HTTP:// connections to HTTPS://, you can setup a VirtualHost, and use the Redirect directive to forward all requests to a secure URL: This assumes that non-secure connections are terminated on TCP port 80, and secure connections are terminated on TCP port 443.

$ read more →