![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Serving and Management how to web server support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Moderator/Fedora Amb.
|
Thoughts on securing apache
Hi,
I am looking for information on how to secure my apache server. It is just running with the standard security features. I did a little reading on how to secure it from the apache website but it didn't make a lot of senses to me. So I am looking for some ideas from the folks here at the forum. I am running Fedora 10 and apache mod_ssl just so that you know. Cheers!
__________________
![]() Linux Forever!
|
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Manager, Alternative Comp
|
Re: Thoughts on securing apache
mod_ssl will only give you SSL capabilities to encrypt the actual transmission. It won't do anything for you in regards to securing the actual software.
What things confused you? Perhaps someone can explain things better. One place you may wish to start if you're using any PHP scripts (any scripts or no scripts, doesn't matter, it helps) is to install and configure ModSecurity. It basically looks for specific URL's that are accessing your server and rejects them. Here's an example of my Mod Security log. Code:
Date Time IP GET Host Message Action 2007-11-24 10:36:40 1.2.3.4 /cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd HTTP/1.1 www.domain.com Access denied with code 406. Pattern match "/etc/passwd" at THE_REQUEST 406
__________________
|
|
|
|
|
|
#3 (permalink) |
|
Moderator/Fedora Amb.
|
Re: Thoughts on securing apache
Skie,
Here are a couple of things that I am looking for. One is how to set up .htaccess. I have heard that it is important. The other thing is this server will be hosting my home business site, and I will be sending personal information over it, i.e. names and emails, so I don't want people to be able to see the traffic going through it. These are just a couple that I can think of for now. Right now my server is just for my home use. But, I might want to use it for something else later on. I am definitely going to look at ModSecurity it looks really interesting. Cheers!
__________________
![]() Linux Forever!
|
|
|
|
|
|
#4 (permalink) |
|
Manager, Alternative Comp
|
Re: Thoughts on securing apache
The .htaccess file can do a number of things (redirecting users to a different page/website, blocking users from seeing a page, handling HTTP Authentication, etc). I haven't learned everything there is to know about them as there is a lot of features that you can use and sometimes they can get quite complex. I've only used the features that I specifically needed. If you take a look at this .htaccess generator, you'll see what I'm talking about. http://cooletips.de/htaccess/ Mod Rewrite is probably the most commonly used feature.
For transmitting personal information, you'll definately want SSL. You'll need to purchase an SSL certificate and you'll need a dedicated IP address (If any other websites share the same IP and you try to use https on them, you'll get the main site that's set up for SSL instead). If you're using Apache 2.x, I can give you my ModSecurity config which should work for you without any issues. Unfortunately, if you're using Apache 1.x, then my config won't work as the syntax for ModSecurity changed between Apache versions. The biggest security risk is the scripts/software that you're using. Everytime one of my customers has had their website hacked, it was because they failed to properly update their PHP or Perl scripts. However, you'll also want to make sure that you keep Apache, Perl and PHP itself updated. And I shouldn't have to say it, but keep the Kernel and the rest of the software on that system up to date as well. If you're not using the server for anything other then as a web server, disable any other software. Better yet, uninstall it. The more you have installed/running, the bigger the security risk. If you never use/login using a GUI, then remove Gnome/KDE/X. There's no reason to ever keep it.
__________________
|
|
|
|
|
|
#5 (permalink) |
|
Moderator/Fedora Amb.
|
Re: Thoughts on securing apache
Hi Skie,
I am having problems with the ./configure command. It is giving me this: Code:
[root@localhost apache2]# ./configure checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl.exe... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking for C++ compiler default output file name... configure: error: in `/home/will/Desktop/modsecurity-apache_2.5.7/apache2': configure: error: C++ compiler cannot create executables See `config.log' for more details. [root@localhost apache2]# Cheers!
__________________
![]() Linux Forever!
|
|
|
|
|
|
#6 (permalink) |
|
Manager, Alternative Comp
|
Re: Thoughts on securing apache
It looks like gcc is not installed or not properly installed. Which distro are you using on that computer? If it's ubuntu, please run the following:
Code:
sudo apt-get install build-essential Code:
yum install gcc yum install binutils
__________________
Last edited by Skie; 03-03-2009 at 07:38 AM. |
|
|
|
|
|
#7 (permalink) |
|
Moderator/Fedora Amb.
|
Re: Thoughts on securing apache
Here is what I get when I try that:
Code:
[root@localhost ~]# yum install gcc Loaded plugins: refresh-packagekit Setting up Install Process Parsing package install arguments Package gcc-4.3.2-7.i386 already installed and latest version Nothing to do [root@localhost ~]# yum install binutils Loaded plugins: refresh-packagekit Setting up Install Process Parsing package install arguments Package binutils-2.18.50.0.9-8.fc10.i386 already installed and latest version Nothing to do [root@localhost ~]#
__________________
![]() Linux Forever!
|
|
|
|
|
|
#8 (permalink) |
|
Manager, Alternative Comp
|
Re: Thoughts on securing apache
Strange. Try this:
Code:
yum install gcc-c++ yum install cpp
__________________
|
|
|
|
|
|
#9 (permalink) | |
|
Moderator/Fedora Amb.
|
Re: Thoughts on securing apache
Ok,
Sorry for the delay, I was taking a couple days off from this project to clear my head. I got some of the configure to work but now I am getting this message. Quote:
Cheers!
__________________
![]() Linux Forever!
|
|
|
|
|
![]() |
| Thread Tools | |
|
|