Questions tagged [apache-2.2]

Version 2.2 of the Apache HTTP Server. When asking questions about virtualhosts, please include the output of the following command: "apache2ctl -S" (or "httpd -S" depending on your OS)

OFF-TOPIC WARNING: Apache version 2.2 reached end-of-life with the final release of version 2.2.34 in July 2017. No further evaluation of security risks will be published for 2.2.x releases, and Apache users should immediately transition to version 2.4.x. Because Apache 2.2 is unsupported, most, if not all, questions regarding Apache 2.2 will be off-topic on ServerFault.

The Apache HTTP Server is a popular Open Source Web server.

This tag should be used for questions specific to version 2.2 of Apache HTTPD. For more general Apache HTTP Server related questions, you should use the Apache2 tag instead.

Apache is very well documented and most functionality is described in detail within this documentation. Specific documentation is available for Version 2.2

If you are asking a question on Server Fault about Virtual Hosts, can you please include the output of either:

# Debian Linux and its derivates
apache2ctl -S
# Most other UNIX/Linux distributions
apachectl -S
# Non UNIX/Linux distributions or if you are unable to find apachectl
httpd -S 

Including this will involve in a much faster answer to your question, as no doubt the first thing people will ask for is that output.


For questions about Apache 2.4 please use

17280 questions
36
votes
3 answers

How to Exclude an URL for Apache Mod_proxy?

We have two Apache server as front-end and 4 tomcat server as back-end configured using mod_proxy module as load balancer. Now, we want to exclude an single tomcat url from the mod_proxy load balancer. Is there any way or rule to exclude? Proxy…
Mughil
  • 1,929
  • 1
  • 19
  • 28
36
votes
6 answers

How to enable TLS 1.1 and 1.2 with OpenSSL and Apache

In light of a growing number of security issues, such as the newly announced Browser Exploit Against SSL/TLS (BEAST), I was curious how we could go about enabling TLS 1.1 and 1.2 with OpenSSL and Apache to ensure that we will not be vulnerable to…
John
  • 2,276
  • 7
  • 44
  • 60
36
votes
8 answers

How to reduce memory usage on a Unix webserver

I'm currently using a Joyent Accelerator to host my webapps, and it's working fine, however I need to reduce costs so I'm downgrading my current plan and that imposes some new memory limits (256M rss, 512M swap). I wasn't too far over them…
lima
  • 807
  • 1
  • 9
  • 14
36
votes
5 answers

Why are docx, xlsx, pptx downloading from webserver as zip files?

On my Apache server I have stored several docx, xlsx pptx files. Some client browsers think that theses are regular zip files and change the file extension when downloading. How do I make it not do that anymore. (Using Ubuntu server)
daveilers
  • 609
  • 1
  • 5
  • 8
35
votes
2 answers

SSL password on apache2 restart

I setup wildcard SSL certificate from Godaddy on Apache2. Whenever the server restarts it asks for the passphrase for the SSL certificate's private key. What's the best way to remove this obstacle to restarts, because when logfile rotation restart…
ryw
  • 461
  • 1
  • 4
  • 6
35
votes
3 answers

How can I return a 503 status in apache without invoking external scripts

I need to return a 503 status code from one of my sites while it's down for maintenance, in the time-honoured SE_firendly fashion. I can't seem to work out how to do this without invoking external scripts, which I'd rather avoid. Is there an apache…
dan mackinlay
  • 453
  • 1
  • 4
  • 5
35
votes
2 answers

Enabling mod_headers on apache2

I am trying to enable the module "headers" into my apache2 installation on ubuntu 10.04 system, here's some info: Server version: Apache/2.2.14 (Ubuntu) When I run the command: a2enmod headers I get this output: ERROR: Module headers does not…
0wn3r
  • 866
  • 1
  • 8
  • 21
35
votes
6 answers

Restrict Apache to only allow access using SSL for some directories

I have an Apache 2.2 server with an SSL certificate hosting several services that should be only access using SSL. ie: https://myserver.com/topsecret/ should be allowed while http://myserver.com/topsecret/ should be either denied or, ideally,…
DrStalker
  • 6,946
  • 24
  • 79
  • 107
35
votes
1 answer

Apache ab: please explain the output

I've looked around, and can't find any detailed explanation of the output at all. Most is indeed easy to understand, but there is one part that flummoxes me: Time per request: 109537.505 [ms] (mean) Time per request: 109.538 [ms] (mean,…
Mei
  • 4,590
  • 8
  • 45
  • 53
35
votes
3 answers

How do you Install PHP5 without installing Apache in ubuntu?

Is it possible to install PHP5 without installing apache, in Ubuntu? If so, how?
Ryan
  • 5,831
  • 24
  • 72
  • 91
35
votes
4 answers

Is there a way to install Apache Bench (ab) without installing apache

Can you provide instuctions on how to install ab on a fedora distro with or without installing the apache web server? With yum or compiling from source.
arnorhs
  • 465
  • 1
  • 5
  • 8
34
votes
1 answer

Generate .key and .crt from PKCS12 file?

How exactly would I generate a .key file and a .crt file from a .p12 file?
Fela Maslen
  • 1,243
  • 2
  • 12
  • 19
34
votes
1 answer

What is the name and location of the Nginx config file (htaccess equivalent)?

There are many tutorials on how to write Nginx rewrite rules to mimic Apache's .htaccess file but I can't confidently say I know what the name or location of this so-called Nginx config file actually is. I'm specifically looking for the Nginx config…
tim peterson
  • 693
  • 2
  • 9
  • 18
34
votes
7 answers

How to best defend against a "slowloris" DOS attack against an Apache web server?

Recently a script called "slowloris" has gained attention. The basic concept of what slowloris does is not a new attack but given the recent attention I have seen a small increase in attacks against some of our Apache websites. At the moment there…
KPWINC
  • 11,394
  • 3
  • 37
  • 45
34
votes
3 answers

How do I create Virtual Hosts for Different Ports on Apache?

I want apache to do this > mydomain.com:80 --- opens var/www1 mydomain.com:81 --- opens var/ww2 mydomain.com:82 --- opens var/www3 Problem is I don't know if those ports are open on Linux (how do I check?) And if they're not how do I open them…
qodeninja
  • 2,753
  • 10
  • 32
  • 33