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
35
votes
6 answers

Can't remove Server: Apache header

I have "Server: Apache" in my HTTP response headers and want to remove it. I followed instructions like adding this to httpd.conf: ServerSignature Off ServerTokens Prod Header unset Server But the last line has no effect. First two lines have…
Audiophile
  • 970
  • 2
  • 8
  • 20
33
votes
2 answers

Standard 401 response when using HTTP auth in flask

In flask, I'm using the following snippet to enable HTTP auth: def authenticate(): return Response('', 401, {'WWW-Authenticate':'Basic realm="Login Required"'}) Now, in my past experience with Flask, if…
ingh.am
  • 25,981
  • 43
  • 130
  • 177
33
votes
2 answers

.htaccess File Options -Indexes on Subdirectories

I have the following .htaccess line, simple no indexes on root. Options -Indexes What do we add so it propagates to any sub directory instead of having to create one file for each? One .htaccess on root only.
Codex73
  • 5,690
  • 11
  • 56
  • 76
32
votes
5 answers

403 Forbidden error with Django and mod_wsgi

I created Django project in home directory so it is in home directory. Setup Django Verison : 1.5.1 Python Version : 2.7.5 mod_wsgi Version: 3.4 Home Directory : /home/aettool Contents of /home/aettool/aet/apache/django.wsgi import os import…
g4ur4v
  • 3,210
  • 5
  • 32
  • 57
31
votes
4 answers

Installing Apache on Windows Subsystem for Linux

Having just updated to the newest Windows 10 release (build 14316), I immediately started playing with WSL, the Windows Subsystem for Linux, which is supposed to run an Ubuntu installation on Windows. Maybe I'm trying the impossible by trying to…
bluppfisk
  • 2,538
  • 3
  • 27
  • 56
31
votes
2 answers

Change localhost directory for Yosemite Apache 2.4

I have clean installed Mac OSX Yosemite but I cant configure the Apache 2.4 like I have always done on older OSX versions. Here is what I want to do : set the "localhost" directory to "/Users/username/Public/". But, everything I tried won't work, I…
Jordan
  • 3,776
  • 3
  • 22
  • 28
30
votes
5 answers

How can I implement single sign-on (SSO) using Microsoft AD for an internal PHP app?

I'm vaguely aware that on a computer joined to a domain IE can be asked to send some extra headers that I could use to automatically sign on to an application. I've got apache running on a windows server with mod_php. I'd like to be able to avoid…
reconbot
  • 5,138
  • 6
  • 45
  • 63
29
votes
3 answers

Multiple RewriteConditions: How to chain them before a set of rules?

Q1: How to chain these two conditions making them if BOTH A AND B, then proceed... Q2: How to make them stick for all the rewriteRules below and not just the first rule? RewriteCond %{REQUEST_URI} ^IMAGE-.*$ // if filename starts with IMG-…
Sam
  • 15,254
  • 25
  • 90
  • 145
29
votes
2 answers

What does this this HTTP Authorization RewriteRule do?

I have an rewrite recursion error somewhere on my website that Google Bot caused, but I can't find the url that caused it because my Loglevel is low. I raised it but it has not happened again so far. RewriteRule .* -…
The Surrican
  • 29,118
  • 24
  • 122
  • 168
28
votes
3 answers

Is there any way I could change the order of which Apache VirtualHosts load first?

I'm using a wildcard subdomain to manage most of my requests but I'm running into an issue of getting one of my subdomains (let's say, wiki.domain.com) to load first. I understand that loading this inside an httpd.conf or something would just be a…
Jake Bellacera
  • 884
  • 1
  • 9
  • 18
27
votes
5 answers

Unable to start the Phusion Passenger watchdog?

I have done a Phusion Passenger setup on Ubuntu 10.04, with Apache2. Whenever I restart the Apache server I got the following error message, and the Rails application is not running. [error] *** Passenger could not be initialized because of this…
suvankar
  • 1,548
  • 1
  • 20
  • 28
27
votes
6 answers

Node.js slower than Apache

I am comparing performance of Node.js (0.5.1-pre) vs Apache (2.2.17) for a very simple scenario - serving a text file. Here's the code I use for node server: var http = require('http') , fs = require('fs') fs.readFile('/var/www/README.txt', …
Art
  • 23,747
  • 29
  • 89
  • 101
27
votes
2 answers

How to check is Apache2 is stopped in Ubuntu?

I want to make sure apache2 service is stopped. 1. I need to verify if apache2 is installed or not. when I type: sudo /etc/init.d/apache2 stop I got: sudo: /etc/init.d/apache2: command not found Does this mean apache2 is not installed? Or is it…
Li'
  • 3,133
  • 10
  • 34
  • 51
27
votes
3 answers

Apache Port Proxy

I have a non-Apache server listening to port 8001 and Apache listening port 80. I want a certain virtual domain to actually be served by the non-Apache server over port 80. Example: Servername example.com # Forward this on…
Dave
  • 1,658
  • 3
  • 17
  • 19
26
votes
3 answers

Apache: how to hide server version and operation system from users?

I've read on one site that I need to add two lines to httpd.conf file: ServerSignature Off ServerTokens Prod But when I've added them nothing changed. As previously I can see in my browser Apache/2.2.16 (Debian) Maybe that's important: When I…
Vitalii Ponomar
  • 10,686
  • 20
  • 60
  • 88