RSS Feed

Tag Archives: Linux

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

Why I will not watch youtube links you send me

In no particular order:

Youtube is flash–flash is evil.
Most are a waste of time anyway, going rate for my time is $13 an hour. Do the math.
I block flash, its annoying to have to unblock it. I am lazy.
The exception to this rules is when we’re swapping music, which is the only thing i use youtube for.
I do not care about your wrestling or sluts or sports. Please shut the fuck up about it.
If you really think i want to see it, then tell me about it not just “ZOMG AWESOME VID WATCH NOW”
Flash overheats my laptop, i have done damage to it already via flash, I need it to last a few more years.
Your annoying. Why should I listen to anything you say anyway.
I do have a highspeed connection. Until youtube comes on. I Would like my internet to stay fast.
I cannot watch it easily with VLC or another desktop media player.
The sound quality sucks.