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
41
votes
3 answers

Writing Apache2 Logs to stdout/stderr?

I'm running Apache2 in a docker container, and want to write nothing to the disk, writing logs to stdout and stderr. I've seen a few different ways to do this (Supervisord and stdout/stderr, Apache access log to stdout) but these seem like hacks.…
aronchick
  • 695
  • 3
  • 7
  • 15
41
votes
5 answers

How do I enable apache modules from the command line in RedHat?

How do I enable apache modules from the command line in RedHat? On Debian/Ubuntu systems I use a2enmod to enable modules from the command line. Is there an equivalent for RedHat/CentOS type systems?
MarshallY
  • 533
  • 1
  • 4
  • 8
41
votes
3 answers

Simple apache2 redirect from one domain to another

What I want to do is the following: My domain xy.example.com no longer exists. Thus I want to do a simple redirect to the new domain abc.example.com. It should be a redirect, that also works when someone types in the browser bar…
JohnnyFromBF
  • 1,259
  • 6
  • 21
  • 25
41
votes
5 answers

How to find out which httpd.conf apache is using at runtime

I've always struggled to find this: How can you ask apache which httpd.conf file it used to load up? It becomes difficult when you have a number of instances of apache running, or if you haven't looked at the machine for a long time, and there are…
Ali
40
votes
2 answers

How do I get Apache2 to parse (without error) Header directives in a .htaccess?

I am getting pages loading with a 500 internal server error, due I believe to a directive that Apache has not been configured to allow. I have AllowOverride set to all, and a .htaccess file, including:
Christos Hayward
  • 1,162
  • 3
  • 16
  • 35
40
votes
1 answer

How to install Apache Benchmark on CentOS?

I try to install Apache Benchmark using Is there a way to install Apache Bench (ab) without installing apache solutions on my centos but when i run yumdownloader httpd, i get error: root@local [~/httpd]# yumdownloader httpd Loaded plugins:…
Mehdi Yeganeh
  • 453
  • 1
  • 5
  • 12
40
votes
4 answers

How can I install the htpasswd utility in Red Hat / Scientific Linux?

For apache, there is the htpasswd utility, which can be used to generate encrypted passwords for .htaccess access restriction etc. In Ubuntu I can install it via the apache2-utils package, but in Scientific Linux (Red Hat) I find only the following…
Samuel Lampa
  • 545
  • 1
  • 4
  • 7
40
votes
7 answers

How do I get Apache to startup at bootime on Linux?

I have installed Apache 2 from source on my Linux box. apachectl -k start works just fine, but how do I get Apache to start at boot time? This is on a Red Hat Linux distribution: Linux 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007…
grieve
  • 1,547
  • 3
  • 17
  • 18
39
votes
5 answers

How do I tell Apache which PHP to use?

I am running Apache2 on a Mac OS X (10.5). I just compiled PHP 5.2.8 and finally got pdo-mysql working (or so I think). This terminal command: php --version is showing 5.2.8 and I have the right modules installed. But, when I do a phpinfo(), Apache…
Sam McAfee
  • 543
  • 1
  • 5
  • 7
39
votes
4 answers

Difference between ServerName and ServerAlias

I'm not quite clear on the difference between ServerName and ServerAlias. It looks like both of them work as host name settings, except that ServerAlias only works within the tag. That is, I can do: ServerName…
Suman
  • 607
  • 1
  • 6
  • 12
38
votes
2 answers

Proxy Pass not working

I am attempting to get ProxyPass to work on my OpenSUSE 13.1 install. I have tried: a2enmod proxy a2enmod proxy_http a2enmod proxy_connect systemctl restart apache2 systemctl reload apache2 (All combinations of statements to no avail). I keep…
JosephGarrone
  • 481
  • 1
  • 5
  • 8
38
votes
2 answers

Is a central location for authorized_keys a good idea?

I'm in the process of configuring a cloud server to run the following stack: Ruby, Passenger, Apache; under Ubuntu 10.04 (Lucid Lynx). In the process of wanting to make the server easier to manage I setup RSA keys on root, and www-data so that I…
Gavin Miller
  • 585
  • 2
  • 6
  • 9
38
votes
4 answers

How To Change What Version of PHP Apache2 Uses?

Ubuntu 10.04, MySQL 5.1, Apache 2.2, and PHP 5.2/5.3: I just discovered that I am using the wrong version of PHP for a CRM application. Once I figured out how to make a simple phpinfo() script to tell me what Apache2 is using, I tried changing the…
nicorellius
  • 585
  • 2
  • 5
  • 23
36
votes
3 answers

Using Https between Apache Loadbalancer and backends

I am using an apache (2.4) server configured as loadbalancer in front of 2 apache servers. It works fine when I use http connections between loadbalancer and backends, however using https does not work. The configuration of the…
user3240383
  • 361
  • 1
  • 3
  • 5
36
votes
1 answer

NameVirtualHost has no effect

What do you think would be solution to my problem? user@admin:~$ sudo service apache2 restart sudo: unable to resolve host admin * Restarting web server apache2 AH00548: NameVirtualHost has no effect…
alex
  • 361
  • 1
  • 3
  • 3