Apache 2.2 / Debian 5 - Web Server Security

exchange keys

Limp Gawd
Joined
Feb 18, 2009
Messages
339
I want to set up a web server so that I can post a blog and a php script (kplaylist). I want to be sure I am setting up my web server and apps correctly and secure. Anyone have any how-tos on how to properly set it up? With current documentation -- not stuff from like 2003 or something (unless it is still relevant).

I have the following software installed:

- Debian 5 (Lenny)
- Apache 2.2
- MySQL
- PHP 5
- kplaylist (http://www.kplaylist.net/)

P.S. Any recommended web blog software? I really just want to set up a clean blog.
 
Last edited:
Be sure to set your root password on MYSQL.

Disable any services you don't need in apache & php.ini config file.

Only advice i have for yeah. Certainly be following this. Because i wonder this same question.
 
I think I should have written this thread in the Network & Security forum. However, I don't know if there is a way for a non-forum mod/admin to to merge threads from separate forums....
 
HowToForge is awesome, saved me tons of time. I hosted a Linux server workshop a month or so ago teaching some of the students in my major about how to setup a Linux server. It goes from base system to server hosting a blog(Wordpress based) and a regular site(using Joomla! CMS).

It's a pretty thorough tutorial that has all the commands you should need to get up and going.

http://docs.google.com/Doc?docid=0AcdjcDS8H8_JZGZkYjZqZjJfOTJkOWRoN3pnZw&hl=en

Give it a shot and feel free to PM me if you run into major issues.
 
Last edited:
Debian has a pretty secure/sane default configuration, and is careful to set sane defaults in service packages as well. And if you did a basic install and didn't choose a 'task' (ie. Desktop, Web Server or whatever) in the installer, your install should be very slim with no superfluous crap. If it's a single-user machine and just a web server, there's really not much else you need to do. You should probably add a firewall script like Shorewall (my fav, and in the repository) if the box is directly on the internet.

As far as blogs, there's basically two basic 'just a blog thanks' packages I will mention. First, I prefer Serendipity (aka. s9y). It is well designed, well coded, BSD-licensed, reasonably easy to use and nice and supports several databases, you're not stuck on MySQL. Otherwise, use Wordpress. It has hands-down the best admin interface and largest community for mods and such, but the code is atrocious and poorly designed (IMO) (and likely less secure), it's locked to MySQL, and it's GPL-licensed, which I don't like when it is used for web applications as the rights it grants to the end-user vs. the webmaster are somewhat unclear.
 
Would you recommend against selecting "Web server" during debian setup then and installing apache / dependants separately then??
 
Would you recommend against selecting "Web server" during debian setup then and installing apache / dependants separately then??

Yeah, secure systems begin by only having/doing that which is necessary for their assigned task. I like the idea of starting with a system that has nothing but the basics and then building up what I need. I still use apt-get to install what I need, when I need it. It's the best middle ground I've found between building a system "from scratch"(compiling everything from source Gentoo style) and having a spring-loaded prebuilt system.

The description of the packages that are installed using those predefined categories can be found here, but I notice that I only ever use a handful of those commands from the "standard package" selection.
 
Back
Top