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

17290 questions
288
votes
15 answers

Finding out what user Apache is running as?

I want to secure a file upload directory on my server as described beautifully here, but I have one problem before I can follow these instructions. I don't know what user Apache is running as. I've found a suggestion that you can look in httpd.conf…
Anna
84
votes
7 answers

Using variables in Apache config files to reduce duplication?

Is it possible to use variables in Apache config files? For example, when I'm setting up a site with Django+WSGI, the config file might look like: Order allow,deny Allow from all Alias /foo/static…
52
votes
11 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
2 answers

How does Apache merge multiple matching Location sections

I'm working on some basic apache configuration, but I don't understand precisely how apache merges different sections when several of them match an incoming requests URL. The apache documentation in its "How the sections are merged"…
40
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
  • 617
31
votes
2 answers

How to install mod_headers

how can I activate / install mod_headers on my server?
21
votes
1 answer

How to add exceptions to apache reverse proxy rules

I am trying to set a Apache reverse proxy so that requests get proxyed to another application running on 8080. However, I want some directories to be directly served rather than forwarded to proxy. What I want is: http://localhost/ -> http://…
Tania
20
votes
3 answers

Where can I find apache error_log on CentOS

I'd like to know where can I find apache's error log. According to a website that I read, it should be at /var/log/httpd/error_log But I don't have the httpd directory on /var/log
valter
  • 699
  • 5
  • 13
  • 23
19
votes
8 answers

Why isn't Apache Basic authentication working?

I just upgraded Apache from it's 2003 build, to a squeaky-clean, brand-new 2.4.1 build. All seems pretty good except for one glaring thing: In my httpd.conf file I have the following: AllowOverride none Options FollowSymLinks …
Brad
  • 487
18
votes
3 answers

Check whether Apache loaded a specific config?

Having many configuration files, I put up one file but I don't see its effects. Either my config is WRONG, OR the config files are NOT LOADED by Apache. Is there a command I can fire to see wether a specific config file got loaded by Apache or…
Daniel W.
  • 1,749
16
votes
2 answers

What would cause Apache to display a bomb icon for a specific directory?

A user of mine came to me with a question today that has me stumped: Why do .musecore files on our web server show a bomb icon () instead of a folder icon? More generally, how does Apache decide what icon to display, and where can I inspect and/or…
jldugger
  • 14,462
15
votes
2 answers

How can I log information about cookies?

I would like to add cookie information to my Apache access logs ie: email, username (the cookie is created by php file, not Apache). Can I add something to log.conf file similar to: \"%{cookieName}i\" to LogFormat "%h %l %u %t \"%r\" %>s %b…
lankelan
15
votes
2 answers

Invalid command 'VirtualDocumentRoot'

I'm unsure as to why I'm getting the following error when apache is rebooted: Invalid command 'VirtualDocumentRoot', perhaps misspelled or defined by a module not included in the server configuration Action 'start' failed. The snippet it is…
andy
  • 239
  • 1
  • 4
  • 10
15
votes
5 answers

Why does htop show lots of apache2 processes by ps aux doesn't?

I am running a webserver with apache2 and ubuntu. Using ps I can see only a few apache processes running: ps aux | grep apache However if I htop, I can see loads of apache2 processes running. About 2 dozen. Why the difference?
Amandasaurus
  • 32,281
  • 69
  • 194
  • 263
15
votes
2 answers

How to add virtual hosts without having to restart apache?

When I read tutorial on how to create /add virtual hosts, the last sentence is always something like: ... now restart apache and you are done! Now, many (most|all) web hosts have a panel that allow you to create new virtual hosts which are activated…
augustin
  • 395
1
2 3
69 70