RSS Feed

Category Archives: hosting

Notes on apache

Posted on

Some notes I made for myself for setting up my server again, which runs php 5.2, and has pretty directories and a few other goodies. Hope this helps someone.

All instructions are good for opensuse 11.2 with apache 2.2.

Enabled directories:

Add this to httpd.conf


Options Indexes FollowSymLinks MultiViews


repeat as desired

Add CSS styling directories:

edit /etc/apache2/mod_autoindex-defaults.conf

Add IndexStyleSheet “

to the end of it, and add the CSS sheet to the directory.

Change icons:

Add this repo

zypper install apache2-icons-oxygen

zypper install apache2-icons-oxygen


Comment out:

#Include /etc/apache2/mod_autoindex-defaults.conf


Include /etc/apache2/mod_autoindex-defaults-oxygen.conf

Follow instructions at Add CSS styling directories: to add the css back to it.

Adding Google analytics to a 404 or other error page

Get your google analytics code

CD usr/share/apache2/error/include/

Edit bottom.html

Add the GA code right above </body>

Add Search to a 404 or other error page

CD usr/share/apache2/error/include/

edit top.html

Add this in the CSS area


padding: 4px;

width: 400px;

position: relative;

margin-left: auto;

margin-right: auto;

margin-top: -60px;


Below the <h1>…</h1>

Add this, customize as needed

<form name=”gs” id=”gs” method=”get” action=””&gt;

<div id=”search”>


<input type=”text” name=”q” size=”25″ maxlength=”255″ value=””>

<input type=”submit”value=”Google!”>



<input type=”checkbox” name=”sitesearch” value=””>Only search<br>

<input type=”checkbox” name=”sitesearch” value=””>Include<br>




The 2nd checkbox can be removed, but it uses if you want to have a 2nd site search option, IE. A blog posted at wordpress/tumblr.

Php.ini timezone

edit /etc/php5/apache2/php.ini

find “[Date]

; Defines the default timezone used by the date functions


;date.timezone =

Remove the ; to uncomment date.timezone, and add your timezone as found

End result looks like this


; Defines the default timezone used by the date functions


date.timezone =America/New_York

php.ini file size upload

Search ‘upload_max_filesize’

Set to something like

upload_max_filesize = 25M

Search ‘post_max_size’

Edit to something matching or higher than max_filesize, like this

post_max_size = 25M