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
46
votes
1 answer

How can I make a virtual host accept multiple domains?

I have two different domains I want to use for this website, how can I configure the virtual host to make this work? Is it possible to assign it more than one server name?
agente_secreto
  • 7,959
  • 16
  • 57
  • 83
46
votes
5 answers

Apache and logrotate configuration

Last week I found a problem on my server, because the disk usage was 100%, and I found out apache had created a huge error.log file of 60GB. I changed then the LogLevel to emerg, but after one week, it is again 1.3GB which is definitely too…
sissy
  • 2,908
  • 2
  • 28
  • 54
46
votes
3 answers

Why has the apache2 www dir been moved to /var/www/html?

I just upgraded my server and saw that the default.conf file in sites-available was now pointing to /var/www/html instead of /var/www. What was the reason for this change?
f.ardelian
  • 6,716
  • 8
  • 36
  • 53
45
votes
2 answers

Proxying with SSL

I have a Linux host running Apache and a Windows host running IIS. I have a domain that points to the Linux host and need to relay (proxy) requests for it to IIS; I thus have the following virtual host definition in Apache (which works just…
ekkis
  • 9,804
  • 13
  • 55
  • 105
45
votes
4 answers

Multiple mod_wsgi apps on one virtual host directing to wrong app

I'm trying to get two (or more) Django applications set up at subdirectories under the same domain, e.g.: http://example.com/site1/ http://example.com/site2/ I know that normally this works fine by setting up an apache virtualhost like…
Gabriel Hurley
  • 39,690
  • 13
  • 62
  • 88
45
votes
3 answers

How to install & configure mod_wsgi for py3

I installed & configured mod_wsgi for python2.7 but now I would also like to have mod_wsgi for py3 I'm in ubuntu 12.04 My apache conf file looks like this for py2.7 : WSGIProcessGroup my_web …
Lazik
  • 2,480
  • 2
  • 25
  • 31
44
votes
2 answers

X-Pad: avoid browser bug header added by apache

I see this header appended to the response from apache. Does it have any significance in new age browsers; or it's merely there to circumvent a bug in older versions of Netscape. Seems weird. EDIT I was doing a performance testing on our app, when…
Priyank
  • 14,231
  • 18
  • 78
  • 107
44
votes
8 answers

php.ini changes, but not effective on Ubuntu

I want change the limit of PHP upload file's size And this is some information of the output my phpinfo: Configuration File (php.ini) Path /etc/php5/apache2 Loaded Configuration File /etc/php5/apache2/php.ini And this is the content of my…
tinybai
  • 916
  • 1
  • 6
  • 17
43
votes
2 answers

"OR" Flag in .htaccess mod_rewrite

Just found this .htaccess rewrite code RewriteEngine on RewriteCond %{HTTP_HOST} ^my.domain.com$ [NC,OR] RewriteCond %{REQUEST_URI} !public/ RewriteRule (.*) /public/$1 [L] And I was wondering what was the purpose of the "OR" flag. Already checked…
gabriel-kaam
  • 1,230
  • 1
  • 12
  • 13
42
votes
13 answers

Failed Apache2 start, no error log

I would restart Apache2 but there comes an Error $ sudo service apache2 start Starting web server apache2 Action 'start' failed. The Apache error log may have more information. But all error logs in "/var/log/apache2/" are empty. Edit: The Files…
fechnert
  • 1,215
  • 2
  • 12
  • 30
40
votes
14 answers

WordPress: Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page

Does anyone know what this error message on WordPress means? Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page. I couldn't find any errors that I can think of. This…
Anthony Kung
  • 1,025
  • 3
  • 12
  • 22
39
votes
2 answers

NameVirtualHost *:80 has no VirtualHosts

I have two domain names, two ssl certs and two ip addresses. I am trying to configure my apache virtualhost files for them. First, i commented out all instances of "NameVirtualHost" and "Listen" for ports 80 and 443. Then i did the following with…
Jay
  • 6,206
  • 11
  • 48
  • 82
38
votes
5 answers

How to send compressed (deflated) SVG via Apache2?

I have specified the following attributes in my site's .htaccess file: AddOutputFilterByType DEFLATE image/svg+xml DeflateCompressionLevel 9 Header append Vary Accept-Encoding However, my SVG asset is not being sent in compressed form: $ curl…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
36
votes
10 answers

Windows 7 php + Symfony2 terribly slow

This is an issue I've been having for a long time. I want to run PHP applications on my windows computer and it has a terribly high load time, around 10-25 seconds. I have tried many things: First I tried a simple XAMPP installation I read WAMP…
David Frank
  • 5,918
  • 8
  • 28
  • 43
35
votes
1 answer

Where can I find good reference/tutorial on writing Apache modules (in C)?

I've looked all over and can't really find much of anything. I need three basic things: Good API reference Some sort of a tutorial Good architectural overview I have the module source code and am going through it - but I really don't have much of…
Brad
  • 11,262
  • 8
  • 55
  • 74