Questions tagged [apache2]

Apache (HTTP Server) /əˈpætʃiː/ is a modular cross-platform web server software with a large variety of features(called modules) including SSL, compression, log, proxy and server-side programming language interfaces like Perl, Python, Tcl, and PHP.

The Apache HTTP Server, commonly referred to as Apache ( /əˈpætʃiː/), is web server software notable for playing a key role in the initial growth of the World Wide Web. In 2009 it became the first web server software to surpass the 100 million website milestone.
Apache was the first viable alternative to the Netscape Communications Corporation web server (currently known as Oracle iPlanet Web Server), and has since evolved to rival other web servers in terms of functionality and performance. Typically Apache is run on a Unix-like operating system.

Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. The application is available for a wide variety of operating systems, including , GNU, FreeBSD, , , Novell NetWare, AmigaOS, Mac OS X, Microsoft , OS/2, TPF, and eComStation. Released under the Apache License, Apache is characterized as open-source software.

Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Some common language interfaces support , , , and . Popular authentication modules include mod_access, mod_auth, mod_digest, and mod_auth_digest, the successor to mod_digest. A sample of other features include SSL and TLS support (mod_ssl), a proxy module (mod_proxy), a URL rewriter (also known as a rewrite engine, implemented under mod_rewrite), custom log files (mod_log_config), and filtering support (mod_include and mod_ext_filter).
Popular compression methods on Apache include the external extension module, mod_gzip, implemented to help with reduction of the size (weight) of web pages served over HTTP. ModSecurity is an open source intrusion detection and prevention engine for web applications. Apache logs can be analyzed through a web browser using free scripts such as AWStats/W3Perl or Visitors.

Virtual Hosting allows one Apache installation to serve many different actual websites. For example, one machine with one Apache installation could simultaneously serve www.example.com, www.test.com, test47.test-server.test.com, etc.
Apache features configurable error messages, -based authentication databases, and content negotiation. It is also supported by several graphical user interfaces (GUIs). It supports password authentication and digital certificate authentication. Apache has a built in search engine and an authorizing tool and supports .

Although the main design goal of Apache is not to be the "fastest" web server, Apache does have performance comparable to other "high-performance" web servers. Instead of implementing a single architecture, Apache provides a variety of MultiProcessing Modules (MPMs) which allow Apache to run in a process-based, hybrid (process and thread) or event-hybrid mode, to better match the demands of each particular infrastructure. This implies that the choice of correct MPM and the correct configuration is important. Where compromises in performance need to be made, the design of Apache is to reduce latency and increase throughput, relative to simply handling more requests, thus ensuring consistent and reliable processing of requests within reasonable time-frames.

The Apache version considered by the Apache Foundation as providing high-performances is the multi-threaded version which mixes the use of several processes and several threads per process.

Unless you are asking about how to write Apache modules, questions with this tag probably belong on serverfault.com rather than stackoverflow.com.

Reference

7951 questions
16
votes
11 answers

Apache/xampp command line start error: AH00436: No installed service named "Apache2.4"

I installed Apache server on Windows 7 Pro with Xampp distribution. Apache starts fine from the XAMPP Control Panel, but I want to be able to control it from a command prompt. When I try to start it from the command prompt, I am getting the…
vlr
  • 780
  • 4
  • 16
  • 33
16
votes
3 answers

How does apache PHP memory usage really work?

To give some context: I had a discussion with a colleague recently about the use of Autoloaders in PHP. I was arguing in favour of them, him against. My point of view is that Autoloaders can help you minimise manual source dependency which in turn…
Sirhara
  • 381
  • 2
  • 8
15
votes
3 answers

Is there a way to remove apaches Reverse Proxy Request Headers?

When acting as a reverse proxy, apache adds x-forwarded headers as described here. http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers In my configuration I have configured server A as a forward proxy. There is a rule like…
The Surrican
  • 29,118
  • 24
  • 122
  • 168
15
votes
5 answers

Apache Multiple VirtualDocumentRoot

Using Apache2 on a Linux system is there a way to have multiple VirtualDocumentRoot using mod_vhost_alias? This is naming convention I am currently using and would like to continue to use: host directory 127.0.0.1 domain …
Ben
  • 1,441
  • 4
  • 18
  • 20
15
votes
2 answers

Kerberos Authentication in PHP

Let's just assume that I don't know much about Kerberos - just the basics. I have... Debian Linux 2.6 Webserver Apache 2.2 mod_auth_kerb/5.3 PHP/5.2 a (working) Kerberos Realm Windows Client Firefox 3 an logged in identity…
BlaM
  • 28,465
  • 32
  • 91
  • 105
15
votes
2 answers

Apache: One setting for multiple directories

I'd like to protect multiple directories with mod_digest with one settings. Currently I have this /etc/apache2/conf.a/mod-digest_realm-protected.conf AuthType Digest AuthName "protected" AuthDigestDomain /adminer/…
Hologos
  • 397
  • 3
  • 11
15
votes
1 answer

Setting timeout for all the ProxyPass mappings in Apache Server mod_proxy directive

What I have and works: I'm using Apache HTTPD 2.2 for proxy requests. I have multiple ProxyPass mappings: ProxyRequests On AddDefaultCharset off Order deny,allow Allow from all ProxyPreserveHost Off ProxyPass /a…
Raul Rene
  • 10,014
  • 9
  • 53
  • 75
15
votes
1 answer

Generate access logs for different subdirectories in Apache

I have some sub-applications in my site, for example: http://server/app/subapp1 http://server/app/subapp2 How can I generate different log files for each directory? http://server/app/subapp1/log/access_log http://server/app/subapp2/log/access_log
Cesar
  • 1,610
  • 2
  • 16
  • 42
14
votes
1 answer

How to use apache2 mod_rewrite within a Directory directive that uses wildcards?

I have written a web application which I run under a dedicated server for hosting the web application. Instances of this web application are available at different domains, and each domain has its own copy of the web application files, allowing for…
chris
  • 831
  • 1
  • 8
  • 13
14
votes
6 answers

Failed to start The Apache HTTP Server on ubuntu 18.04

I am trying to create a web server on my ubuntu 18.04 so i installed Apache2 but i can't start it. Here's what appeared when i run the systemctl status apache2.service command apache2.service - The Apache HTTP Server Loaded: loaded…
moe_
  • 219
  • 2
  • 3
  • 15
14
votes
4 answers

Redirect is not allowed for a preflight request

I have this problem where i get the response when trying to use a rest api: "Access to fetch at 'https://kollektivet.app:8082/api/login/' from origin 'https://kollektivet.app' has been blocked by CORS policy: Response to preflight request doesn't…
somethingsomething
  • 151
  • 1
  • 1
  • 4
14
votes
3 answers

hosting multiple SSL certs on apache

I hope someone can give me a hand with this. I have 2 IPs that I can use to do this and need to host 2 different secure (SSL) domains on the same Apache server. I've read that as of Apache 2.2.something that a single IP can be used, using some sort…
Jim
  • 141
  • 1
  • 1
  • 4
14
votes
5 answers

Using negation in LocationMatch directive

Our site is running on apache and is secured using client certificates. So far there was only one certificate that would provide access to the whole site. Now, we have a requirement to expose jira to a new group of users who should not be able to…
ApacheUser
14
votes
6 answers

Which Apache2 modules can I safely disable?

These are my enabled mods: alias auth_basic authz_default authz_groupfile authz_host authz_user autoindex deflate dir env mime negotiation php5 reqtimeout rewrite setenvif status I'm attempting to reduce Apache's memory footprint as much as…
gregghz
  • 3,925
  • 7
  • 40
  • 69
14
votes
4 answers

Installing PHP 5.3.29 from Sources on Ubuntu 14 with Apache 2 Module

I successfully installed PHP 5.3.29 on Ubuntu 14 with Apache 2 separately. I installed PHP with the following method: sudo -i wget http://in1.php.net/distributions/php-5.3.29.tar.bz2 tar -xvf php-5.3.29.tar.bz2 cd php-5.3.29 ./configure make make…
dondonhk
  • 631
  • 3
  • 6
  • 19