XClose
Dada Typo : http://www.dadamanifesto.org
Dada Typo

Manifesto User Manual 1.04

Configuring Apache and PHP

If you have access to Apache's configuration file

The installer, if it completed successfully, should have printed out an Apache "VirtualHost" directive customized for your site. This information should be added to any VirtualHost directive already in Apache's configuration file for your domain. Be sure that the nomenclature is correct...city names with spaces in the could result in incorrect data being present here, so do any clean up you may need.

Most important, of course, is the LocationMatch directive. Be sure that is included in your Apache configuration file. It should read:
<LocationMatch "(/feature/|/editor|/newswire|/admin|/pbook|/media|/mod)">

Manifesto uses UTF-8 encoding for its pages, but many Apache installations default to serving content in ISO-8859-1. To override this, add
AddDefaultCharset utf-8

You may also want to add

<FilesMatch "\.inc">
 Order allow,deny
 Deny from all
</FilesMatch>
<Directory "/docs/">
 Order allow,deny
 Deny from all
</Directory>
to the VirtualHost directive for your site, to prevent imc_dbinfo.inc (for pre-.99 sites) and the contents of the /docs/ directory from being displayable in a browser.

If you cannot modify Apache's config file, but can use an .htaccess file

Users on shared servers usually cannot modify the Apache configuration file, and so must use a .htaccess file to include the necessary Apache and PHP configuration options. Create a plain text file at the root of your Manifesto site, and name it ".htaccess". The contents of the file should be as follows (replacing domain names and paths with those appropriate for your installation):

<FilesMatch "(feature|editor|newswire|otherpress|admin|pbook|media|mod)">
 ForceType application/x-httpd-php
</FilesMatch>
<FilesMatch "\.inc">
 Order allow,deny
 Deny from all
</FilesMatch>
php_flag register_globals off
php_flag display_errors off
php_flag log_errors on
php_flag track_vars on
php_flag track_errors on 
php_flag magic_quotes_gpc off
php_flag mysql.allow_persistent on 
php_value max_execution_time 300
php_value memory_limit 8M
php_value error_reporting 'E_ALL & ~E_NOTICE'
php_value include_path .:/usr/share/php
php_value error_log /var/log/php-error.log
php_value post_max_size 20M
php_value upload_max_filesize 20M

Important Apache 2.x note: Apache 2.x contains modifications to the code that allows Manifesto's "smart" URLs to work. You need to add the line

AcceptPathInfo on
to your VirtualHost directive for Manifesto to correctly parse the smart URLs.

Be sure that all paths are correct, especially to the logs. By default, Manifesto uses "combined" log format, but can optionally be configured to use an external logging script like the "anonlogger", which logs full hit information using one-way encrypted IP addresses. Bear in mind that, to ensure anonymity, you should use a modified "combined" format that excludes that logging of IP addresses.

Don't forget to configure Apache to not serve any files ending in ".inc". This prevents snooping of .inc files through a browser.

<Files ~"\.inc"> Order allow,deny Deny from all </Files>

If you lost the Apache configuration information after installing, a copy may be found in the docs folder.

Apache logging and anonymity

When it comes to the anonymity on your server, the most important aspect is the Apache log file. You basically have 3 options:
  1. Allow Apache to log IP addresses, using the standard "common" or "combined" format. This provides no possibility of anonymity.
  2. Remove the IP address logging token from Apache's log format entirely. This eradicates any log of your visitors' IP address, but also makes log statistics useless for determining overall visitor information.
  3. Apache can be configured to pipe log output through a program instead of writing it directly to the logfile. Using this technique, it is possible to pipe Apache's output through a little Perl script that encrypts the IP address with a one-way encryption before writing it to disk.

This last option was recommended in previous Manifesto instructions, but used a very vulnerable encryption method that could easily be cracked through brute-force examination of the full range of IP addresses (which isn't very large).

Basically, if the "key" used to encrypt can easily be determined, it can simply be applied to every known IP address until a match is found. The only potentially secure way to do this would be to use a random element to the key that cannot be determined after the fact.

In any case, the only way to absolutely guarantee anonymity is to remove the IP address token from Apache's log. The developers of Manifesto will no longer attempt to solve the problem of IP address logging in Apache!

php.ini settings

After changing the Apache configuration, confirm your PHP settings. You want to make sure that display_errors is OFF, and that logging is configured to write to your log directory. A copy of the PHP configuration options is also included in the docs directory, but the directives below are the most critical.

  • register_globals = Off ;this defaults to OFF in PHP 4.2
  • max_execution_time = 30 ;works well enough
  • memory_limit = 8M ;good enough
  • error_reporting = "E_ALL & ~E_NOTICE"
  • display_errors = Off ;recommended for live server. Use logging instead.
  • log_errors = On ;we will specify the location of the log file in (7)
  • track_errors = On ;Manifesto uses this to report errors
  • error_log = /var/log/httpd/php-error.log ;you may customize this location
  • post_max_size = 20M ;needs to be large enough for video uploads
  • include_path = ".:/var/www/include" ;optional location for imc_classes, etc.
  • upload_max_filesize = 20M ;for large file uploads
  • sendmail_path = ;if sendmail is NOT in its default location, enter it here
  • mysql.allow_persistent = On ;this should be the default

One more consideration. Manifesto maintains its own error log, named dadaphp.log. The location of this file is dictated by the "Log Directory" in the Site Prefs, and needs to be writeable by the Apache user.

Now that you've complete configuration modifications, go ahead and visit your site in a browser! There won't be much to see, but it's ready to receive content!

Return

* Most Popular

 

This site made manifest by Manifesto software