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
60
votes
4 answers

How to redirect root and only root via htaccess?

I want to redirect only my root to another url, but maintain all the /sub/directories where they belong (and redirect) example: mysite.com/1 redirects to somewhere mysite.com/admin opens a page i want mysite.com/ to redirect to mysecondsite.com and…
jardel
60
votes
2 answers

What Should be the Permissions of Apache SSL Directory, Certificate, and Key?

I have my cert.pem and cert.key files in /etc/apache2/ssl folders. What would be the most secure permissions and ownership of: /etc/apache2/ssl directory /etc/apache2/ssl/cert.pem file /etc/apache2/ssl/cert.key file (Ensuring https:// access…
JP19
59
votes
3 answers

Do Apache config files support block commenting?

You can use # to comment out individual lines. Is there a syntax for commenting out entire blocks? I've tired surrounding the block (specifically a block) with ..., but that didn't work.
ripper234
  • 5,890
  • 9
  • 41
  • 49
58
votes
8 answers

Apache: SSLCertificateKeyFile: file does not exist or is empty

I am configuring SSL for Apache 2. My system is Ubuntu Server 10.04 LTS. I have the following settings related to SSL in my vhost configuration: SSLEngine On SSLCertificateKeyFile /etc/ssl/private/server.insecure.key SSLCertificateFile …
blueFast
  • 4,200
  • 13
  • 37
  • 54
56
votes
3 answers

How to fix 'logjam' vulnerability in Apache (httpd)

Recently, a new vulnerability in Diffie-Hellman, informally referred to as 'logjam' has been published, for which this page has been put together suggesting how to counter the vulnerability: We have three recommendations for correctly deploying…
56
votes
5 answers

Which to install: Apache Worker or Prefork? What are the (dis-)advantages of each?

Based on the descriptions for both the Prefork and Worker MPM, it seems the prefork type is somewhat outdated, but I can't really find a proper comparison of the two types. What i'd like to know: What are the differences between the two…
Aron Rotteveel
  • 8,449
  • 17
  • 53
  • 64
56
votes
6 answers

How to configure basic authentication in Apache httpd virtual hosts?

I'm trying to configure mercurial access using Apache http. It requires authentication. My /etc/apache2/sites-enabled/mercurial looks like this: NameVirtualHost *:8080 UseCanonicalName Off ServerAdmin …
Jader Dias
  • 4,705
  • 19
  • 50
  • 51
54
votes
6 answers

Can an SSL certificate be on a single line in a file (no line breaks)?

SSL certificates by default have line breaks after 67 characters. I'm trying to create SSL certificate files using Chef. Essentially I want to create the entire certificate file from a string variable without any line breaks. I've tried this a few…
wrangler
  • 3,080
  • 5
  • 24
  • 20
53
votes
2 answers

difference between _default_:* and *:* in VirtualHost Context

I want to know the difference between "default:*" and "*:*" in VirtualHost Context. #... ServerName host.example.com #... #... ServerName host.example.com …
Luigi Giuseppe
  • 631
  • 1
  • 6
  • 4
53
votes
4 answers

Difference between SSLCertificateFile and SSLCertificateChainFile?

Normally with a virtual host an ssl is setup with the following directives: Listen 443 SSLCertificateFile /home/web/certs/domain1.public.crt SSLCertificateKeyFile /home/web/certs/domain1.private.key SSLCertificateChainFile…
chrisjlee
  • 1,005
  • 2
  • 13
  • 21
52
votes
7 answers

How do I make Apache Web Server listen on two different ports?

I'd like an Apache Web Server I have installed at home to listen on port 80 and port 8080. I've added Listen 8080 to httpd.conf and restarted the Apache services but the server doesn't seem to be listening on 8080. Punching in http://localhost:8080…
Owen
  • 633
  • 1
  • 5
  • 8
51
votes
10 answers

How do I tell if apache is running as prefork or worker?

How do I tell if apache is running (or configured to run) as prefork or worker?
Simon
50
votes
3 answers

SElinux: allow httpd to connect to a specific port

My system is running CentOS 6.4 with apache2.2.15. SElinux is enforcing and I'm trying to connect to a local instance of redis through my python/wsgi app. I get Error 13, Permission denied. I could fix this via the command: setsebool -P…
savagecitizen
  • 501
  • 1
  • 4
  • 3
50
votes
8 answers

How much of a performance hit for https vs http for apache?

Roughly how much of a performance hit will https take compared to http for the same page? Suppose I can handle 1000 requests/s for abc.php, how much will it decrease by when accessed through https? I know this might be dependent on hardware, config,…
erotsppa
  • 2,113
  • 6
  • 23
  • 24
50
votes
2 answers

What does the suffix .d mean in Linux?

I am configuring apache and by default I have the directories /etc/httpd/conf and /etc/httpd/conf.d. What is the difference? Also you can see the suffix in many other directories like /etc/init.d, /etc/cron.d, etc...
SCL
  • 895
  • 1
  • 11
  • 13