Ubuntu

Apache

Reload configuration

sudo /etc/init.d/apache2 reload

Enable .htaccess

sudo vim /etc/apache2/sites-available/default

In the ”<Directory /var/www/>” section, change:

AllowOverride None

To:

AllowOverride All

Reload Apache's configuration:

sudo /etc/init.d/apache2 reload

Ref: Ubuntu documentation: Enabling Use Of Apache Htaccess Files

Enable mod_rewrite

sudo a2enmod rewrite

Reload Apache's configuration:

sudo /etc/init.d/apache2 force-reload

Source: mod_rewrite for Apache2 in Ubuntu Feisty Fawn 7.04

Show loaded modules

sudo apache2ctl -M

Limit access to a subnet

sudo vim /etc/apache2/sites-available/default

Change:

allow from all

To:

allow from 206.12.30

Enable HTTPS (SSL)

# enable mod_ssl module
sudo a2enmod ssl

# configure Apache for HTTPS
sudo a2ensite default-ssl

# restart Apache
sudo /etc/init.d/apache2 restart

Default certificate:

/etc/ssl/private/ssl-cert-snakeoil.key

Reference:

Note: if you need your .htaccess to keep working with HTTPS, enable them in /etc/apache2/sites-available/default-ssl

Make a folder available on another port

Example: make /home/jerome/a_site available at http://localhost:8091

  • add new port in /etc/apache2/ports.conf
Listen 8091
  • add new site in /etc/apache2/sites-available
cp default new_site

In new_site:

  • change <VirtualHost *:80> to <VirtualHost *:8091>
  • change two occurrences of /var/www to /home/jerome/a_site
  • enable new site
cd /etc/apache2
sudo ln -s sites-available/new_site sites-enabled/new_site
  • restart Apache
sudo /etc/init.d/apache2 restart

System info

Ubuntu version

lsb_release -a

or

cat /etc/lsb-release

Kernel version

uname -r

CPU

cat /proc/cpuinfo

Hard drive

sudo hdparm -i /dev/sda1

Other hardware info

sudo lshw

Install ffmpeg for FLV conversion

The default ffmpeg (installable via Synaptic) can't convert audio to MP3 (audio format for FLV). A solution is to install ffmpeg from Medibuntu repositories.

  • add Medibuntu repositories: Medibuntu
  • install ffmpeg from Medibuntu with Synaptic
  • install system updates

Example:

ffmpeg -i movie.avi -ar 22050 -ab 8 -qscale 6 -r 15 -s 320x240 -f flv  movie.flv

If it doesn't work, look there.

Installation from SVN

Disable system beep

xset b off
xset b 0 0 0

Disable firewall

Warning: this will delete any existing rules.

sudo iptables -P INPUT ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -F

Feedback