Archive for the ‘ Apache ’ Category

Apache module ‘mod_pagespeed’

mod_pagespeed Overview.

mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving content with the Apache HTTP Server.

mod_pagespeed includes several filter that optimize JavaScript, HTML and CSS stylesheets. It also includes filters for optimizing JPEG and PNG images. The filters are based on a set of best practices known to enhance web page performance. Webmasters who set up mod_pagespeed in addition to configuring proper caching and compression on their Apache distribution should expect to see an improvement in the loading time of the pages on their websites.

Three steps to mod_pagespeed

Install

mod_pagespeed is now available as a downloadable binary for i386 and x86-64bit systems, and is tested with two flavors of Linux: CentOS and Ubuntu. The developer may try to use them with other Debian-based and RPM-based Linux distributions.

mod_pagespeed currently only supports Apache 2.2. There are no plans to support earlier versions of Apache, but patches are welcome.

Serve your web pages with Apache and mod_pagespeed

Follow the instructions provided to configure mod_pagespeed with Apache 2.2. In addition, configure caching and compression to get the maximum benefit out of your HTTP Server.

Get familiar with the configuration. There are several filters provided as part of this module, including some exciting experimental features such as CSS outlining. With some experimentation, you can fine-tune the configuration to get the maximum benefit in terms of page performance.

Learn more about Web Performance

The field of web performance is a complex space. While there are many interesting books, blog posts and discussion forums, we provide here a set of pages related to web performance and organize it in terms of contribution to the speed of a web page, whether by serving less bytes -through better compression or caching-, minimizing round-trips and optimizing the order of resource download for the browser.

This documentation is by no means complete or final. We update it regularly with new rules and updates to how the rules apply to modern browsers.

Apache-SSL

Apache-SSL.

Now I’ve got my server installed, how do I create a test certificate?

Step one – create the key and request:

  openssl req -new > server_cert.csr

Step two – remove the passphrase from the key (optional):

  openssl rsa -in privkey.pem -out server_cert.key

Step three – convert request into signed cert:

  openssl x509 -in server_cert.csr -out server_cert.cert -req -signkey server_cert.key -days 365

The Apache-SSL directives that you need to use the resulting cert are:

  SSLCertificateFile /path/to/certs/server_cert.cert
  SSLCertificateKeyFile /path/to/certs/server_cert.key

How do I create a client certificate?

Step one – create a CA certificate/key pair, as above (but only the first two steps)

  openssl req -new > client_cert.csr
  openssl rsa -in privkey.pem -out client_cert.key

Step two – sign the client request with the previous created CA key:

  openssl x509 -req -in client_cert.csr -out client_cert.cert -signkey server_cert.key -CA server_cert.cert -CAkey server_cert.key -CAcreateserial -days 365

Step three – issue the file ‘client_cert.cert’ to the requester.

The Apache-SSL directives that you need to validate against this cert are:

  SSLCACertificateFile /path/to/certs/server_cert.cert
  SSLVerifyClient 2
  SSLVerifyClient require

Create PKCS12 file for use in a webbrowser

  openssl pkcs12 -export -in client_cert.cert -inkey server_cert.key -out clientt.cert.p12

Aliases: point out of webroot

Alias /phpMyAdmin/ "C:/Documents and Settings/admin/My Documents/_CHECKOUTS/phpMyAdmin/"
 
<Directory "C:/Documents and Settings/admin/My Documents/_CHECKOUTS/phpMyAdmin/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>