zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Nginx + apache2 = real-ip

January 30, 2011 by Igor Drobot 4 Comments

Nginx and Apache2 are running great but there is only one tiny problem with the visitors ip’s.

Normaly I let my nginx instance do the logging job, but if you let your Apache do it you will get some problems. Apache will see all incoming requests as coming from localhost (127.0.0.1). Right they are all from nginx.
[Read more…]

Filed Under: Debian, HTTP, Linux, Networking Tagged With: apache2, Nginx, Proxy, real-ip, rpaf

Secure Apache2

June 17, 2010 by Igor Drobot 2 Comments

By default apache shows on each directory listing, error or non existing page etc. apache version, OS Version and some apache modules in the bottom of your site.

Attackers can use this information to their advantage when performing an attack.
I describe a little bit how to secure apache2, to prevent the showing of apache version and server strings.

1
vim /etc/apache2/conf.d/security

vim /etc/apache2/conf.d/security

Configuration should be:

2
3
4
ServerTokens Prod
ServerSignature Off
TraceEnable Off

ServerTokens Prod ServerSignature Off TraceEnable Off

Restart apache:

1
/etc/init.d/apache2 restart

/etc/init.d/apache2 restart

Filed Under: HTTP, Linux, Networking Tagged With: apache2, Debian, HTTP, security, TRACE, webserver

  • « Previous Page
  • 1
  • 2
  • 3
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok