RSS Feed

Tag Archives: opensuse

How to make mod_rewrite work on openSUSE 11.3

As you may know, this blog is hosted at home, on my 5 year old computer, running openSUSE 11.3, and apache.

Just a quick how to, of what I did to make it work. Read the rest of this entry

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

srv/www/htdocs/alpha1beta/files”>

Options Indexes FollowSymLinks MultiViews

</Directory>

repeat as desired

Add CSS styling directories:

edit /etc/apache2/mod_autoindex-defaults.conf

Add IndexStyleSheet “http://alpha1beta.com/css/indexstyle.css

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

Change icons:

Add this repo

http://download.opensuse.org/repositories/home:/javierllorente/openSUSE_11.2/

zypper install apache2-icons-oxygen

zypper install apache2-icons-oxygen

HttpD.conf

Comment out:

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

Add:

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

#search{

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=”http://www.google.com/search”&gt;

<div id=”search”>

<table><tr><td>

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

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

</td></tr>

<tr><td>

<input type=”checkbox” name=”sitesearch” value=”alpha1beta.com”>Only search Alpha1beta.com<br>

<input type=”checkbox” name=”sitesearch” value=”alpha1beta.wordpress.com”>Include Alpha1beta.wordpress.com<br>

</td></tr></table>

</div>

</form>

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

; http://php.net/date.timezone

;date.timezone =

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

http://www.php.net/manual/en/timezones.php

End result looks like this

[Date]

; Defines the default timezone used by the date functions

; http://php.net/date.timezone

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