Sunday 4 December 2011

Ubuntu secure

http://www.andrewault.net/2010/05/17/securing-an-ubuntu-server/

My Install:

apt-get install ssh
apt-get install apache2
apt-get install php5 libapache2-mod-php5
apt-get install php5-mysql
apt-get install denyhosts


Try to get desktop via vnc

apt-get install vnc4server
apt-get install ubuntu-desktop
apt-get install gnome-tweak-tool
apt-get install gnome-shell



To allow SSL on Apache

a2enmod ssl
a2ensite default-ssl
/etc/init.d/apache2 stop
/etc/init.d/apache2 start

good site: https://help.ubuntu.com/10.04/serverguide/C/httpd.html


To remove Apache Signature and custom 404


# vi /etc/apache2/apache2.conf add at the bottom

ServerTokens Prod
ServerSignature Off
ErrorDocument 404 /err.html
ErrorDocument 403 /err.html



Disable docroot / folder display, remove Indexes from Options like below

# vi sites-available/default-ssl and remove Indexes

[Directory /var/www/]
#Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks MultiView
AllowOverride None
Order allow,deny
allow from all
[/Directory]