Apache Web Server

From BC$ MobileTV Wiki
Revision as of 12:39, 4 April 2022 by Bcmoney (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Apache Web Server Logo

Apache Web Server (also known as Apache HTTP Server) is the world's most popular (by volume, deployment/use) web server software platform.

Apache Web Server is definitely the Apache foundation's single most successful (top most downloaded software - #10[1], most used web server - 60.31%[2]) project to date, and is the crown jewel of the foundation's work, enabling millions to publish their works on the World Wide Web.



.htaccess is the name of a configuration file Apache Web Server looks for to route HTTP requests to a given sub-domain or folder on the server. It is most commonly used in unison with a URL pattern module such as mod_rewrite[3] and/or mod_seo[4].



Many people know from their own experience that it's not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.

A new version of XAMPP was recently released, including:

   * Apache HTTPD 2.2.11 + Openssl 0.9.8i
   * MySQL 5.1.30
   * PHP 5.2.8
   * phpMyAdmin 3.1.1
   * FileZilla FTP Server 0.9.29
   * Mercury Mail Transport System 4.52


Windows VISTA (peculiarities)


One possible solution to the many reported Windows problems, is to use a distribution of Apache Web Server optimized for installation and usage on Windows OS to begin with, which is the proposal of Windows Apache MySQL Php (WAMP) server.


When it comes to running a web server on a Mac, the best option is either the built-in (yet limited) local server distributions[9] or a full-blown Apache Web Server installation via MAMP.


The traditional open source platform is still the powerful and robust combination of Linux (), Apache Web Server, MySQL RDBMS and PHP[11].


[13] [14]


Apache Web Server includes a highly customizable extension mechanism known as "modules" (commonly abbreviated as a mod). All module libraries are typically prefixed by mod_ such as the most popular ones:

  • mod_rewrite - URL re-writing capabilities (to re-route requests to one place over to another to determine appropriate response)
  • mod_ldap - ActiveDirectory and/or OpenLDAP integrations
  • mod_proxy - setup a Forward Proxy or Reverse Proxy
  • mod_security - Web Application Firewall (WAF)
  • mod_ssl - Apache interface to OpenSSL
  • mod_geoip - looks up the IP address of the client end user, which can then be used to perform redirection based on country.
  • mod_torcheck - blocks requests from Tor exit nodes
  • mod_cgi - allows usage of CGI scripts in your web server
  • mod_php - allows usage of PHP scripts in your web server
  • mod_perl - allows usage of Perl scripts in your web server
  • mod_python - allows usage of Python scripts in your web server
  • mod_aspdotnet - allows usage of ASP.net/C# scripts in your web server
  • mod_pagespeed - Google authored module to rewrite web pages to reduce latency & bandwidth
  • mod_upload - file upload convenience methods & security helpers
  • mod_xml - enables native XML functions to gain some parsing/serializing performance optimizations over custom scripts
  • mod_xslt - enables native transformation of XML formatted documents to other formats via XSL
  • mod_xmlrpc - enables native use of XML-RPC
  • mod_flvx - stream Flash videos

[15] [16]


See AEM Dispatcher

Re-Write Rules for Web Server

Using Re-Write rules requires the mod_rewrite to be properly configured within your Apache Web Server distribution.

For example, the following mod_rewrite rules can be applied to shorten:






RewriteEngine on
RewriteRule ^([^/\.]+)/foaf/?$ api/foaf/FoafWriter.php?u=$1 [L]


  • ^ means match anything before this point
  • ([^/\.]+) means match one or more characters that aren’t a forward slash or a period
  • /?$ means ensure the only thing that is found after what was just matched is a possible forward slash, and nothing else. (If anything else is found, then this RewriteRule will be ignored.)
  • FoafWriter.php is the actual page to load
  • ?u= is the URL (GET) query parameters
  • $1 is the value captured by mod_rewrite for passing to the page (in the example's case, the username bryan)

[17] [18] [19] [20] [21] [22] [23] [24] [25]




[27] [28] [29] [30]


External Links


  1. http://www.infoworld.com/d/open-source/top-10-open-source-hall-famers-848&current=11&last=1#slideshowTop
  2. April 2011 Web Server Survey: http://news.netcraft.com/archives/category/web-server-survey/
  3. Mod_Rewrite ‘How To’ tutorial: http://www.rankinglabs.com/Mod_Rewrite
  4. Keyword reach URLs in 5 minutes: http://www.helicontech.com/articles/mod_seo/
  5. Is there way to use two PHP versions in XAMPP?: https://stackoverflow.com/questions/45790160/is-there-way-to-use-two-php-versions-in-xampp
  6. wikipedia: WAMP
  7. wikipedia: WIMP (software bundle)
  8. How To Install Perl on a WAMP Server: http://webdevster.com/how-to/install-perl-on-wamp
  9. How to Turn Your Mac Into a Web Server: http:///www.macinstruct.com/node/112
  10. wikipedia: MAMP
  11. LAMP - The Open Source Web Platform: http://onlamp.com/pub/a/onlamp/2001/01/25/lamp.html
  12. wikipedia: LAMP (software bundle)
  13. Apache APISIX - Software Architecture diagram: https://apisix.apache.org/docs/apisix/architecture-design/apisix/
  14. "start-apisix" Java/Apache API Gateway example: https://github.com/ajavageek/start-apisix
  15. Apache hardening - 10 Tips to Secure Your Apache Web Server on UNIX / Linux: https://www.thegeekstuff.com/2011/03/apache-hardening/
  16. Commonly Used Apache Moduleshttps://www.: interserver.net/tips/kb/commonly-used-apache-modules/
  17. mod_rewrite docs: http://httpd.apache.org/docs/current/rewrite/
  18. Getting .htaccess mod_rewrite rules working locally with XAMPP: http://www.web-design-talk.co.uk/126/getting-htaccess-mod-rewrite-working-locally-with-xampp/
  19. How to enable rewrite module in XAMPP, WAMP and Apache: http://www.anmsaiful.net/blog/php/enable-apache-rewrite-module.html
  20. AllowOverride explained: http://vr-zone.com/manual/en/mod/core.html#allowoverride
  21. URL Rewriting for Beginners (with plenty of examples): https://www.addedbytes.com/blog/url-rewriting-for-beginners/
  22. wikipedia: mod_proxy
  23. An In-Depth Guide to mod_rewrite for Apache: https://code.tutsplus.com/tutorials/an-in-depth-guide-to-mod_rewrite-for-apache--net-6708
  24. mod_rewrite, a beginner’s guide (with examples): http://www.workingwith.me.uk/articles/scripting/mod_rewrite
  25. Apache mod_rewrite and Examples: https://www.hostgator.com/help/article/apache-mod-rewrite-and-examples
  26. Speed Tips - Remove Last-Modified and ETag Headers (when using "Expires" header instead): http://www.askapache.com/htaccess/apache-speed-last-modified.html
  27. Where are the Apache Configuration files on Mac? – httpd.conf: https://smartwebdeveloper.com/mac/httpd-conf-location-mac
  28. Installing Apache, PHP, and MySQL on macOS Catalina: https://jasonmccreary.me/articles/install-apache-php-mysql-mac-os-x-catalina/
  29. How to Install Apache Web Server, PHP, Perl on Mac OS X Yosemite: https://crunchify.com/how-to-install-apache-web-server-on-mac-os-x-yosemite/
  30. Setting up an apache web server on mac os Sierra (macbook pro 13 2014): https://stackoverflow.com/questions/39757902/setting-up-an-apache-web-server-on-mac-os-sierra-macbook-pro-13-2014
  31. pls help to rewrite subdomains to subfolders: http://www.webmasterworld.com/apache/3163397.htm
  32. http://stackoverflow.com/questions/6725973/rewrite-folder-to-subdomain-with-htaccess
  33. http://stackoverflow.com/questions/49500/apache-rewrite-based-on-subdomain
  34. How can I add in apache referrer policy header?: https://serverfault.com/questions/880894/how-can-i-add-in-apache-referrer-policy-header
  35. How To Fix a Missing Content-Security-Policy on a Website: https://www.blackhillsinfosec.com/fix-missing-content-security-policy-website/
  36. Is it possible to set headers conditionally?: https://stackoverflow.com/questions/16074750/is-it-possible-to-set-headers-conditionally
  37. Set Apache headers conditionally: https://stackoverflow.com/questions/21270902/set-apache-headers-conditionally
  38. Apache X-Frame-Options Allow-From multiple domains: https://stackoverflow.com/questions/38744953/apache-x-frame-options-allow-from-multiple-domains
  39. X-Frame-Options -- ALLOW-FROM in firefox and chrome: https://stackoverflow.com/questions/10658435/x-frame-options-allow-from-in-firefox-and-chrome
  40. Apache mod_alias RedirectMatch everything except specific pattern: https://stackoverflow.com/questions/26399826/apache-mod-alias-redirectmatch-everything-except-specific-pattern
  41. Rewrite URLs with mod_rewrite and Apache: https://www.linode.com/docs/web-servers/apache-tips-and-tricks/rewrite-urls-with-modrewrite-and-apache/
  42. Site Performance Tip: Update to HTTP2: https://freestar.com/site-performance-tip-update-http2/

See Also

Apache | Tomcat | Web Server | Hotlinking | SEO | Security