apache_module_mod_proxy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
apache_module_mod_proxy [2023/07/11 18:32] wikiadminapache_module_mod_proxy [2023/07/11 20:30] (current) wikiadmin
Line 3: Line 3:
 See: [[https://httpd.apache.org/docs/current/mod/mod_proxy.html]] See: [[https://httpd.apache.org/docs/current/mod/mod_proxy.html]]
  
-Enable the mod_proxy and mod_http modules in Apache’s httpd.conf file.+**Apache mod_proxy library:** The ability to use Apache as a reverse proxy is provided through a shared library named mod_proxy.so. This module is not enabled by default, so you must edit Apache’s httpd.conf file to enable it. You also need to enable Apache’s mod_proxy_http.so shared library.
  
-Apache mod_proxy library: The ability to use Apache as a reverse proxy is provided through a shared library named mod_proxy.so. This module is not enabled by default, so you must edit Apache’s httpd.conf file to enable itYou also need to enable Apache’s mod_proxy_http.so shared library. +**Enable the mod_proxy and mod_http modules in Apache’s httpd.conf file.** Uncomment the appropriate lines in Apache’s httpd.conf file to enable the Apache mod_proxy and mod_proxy_http modules.  **Note that this may not apply to newer versions of Apache2 and Ubuntu.  SEE BELOW**
- +
-Enable Apache mod_proxy: Uncomment the appropriate line in Apache’s httpd.conf file to enable the Apache mod_proxy and mod_proxy_http modules:+
  
 <code> <code>
Line 15: Line 13:
 LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_http_module modules/mod_proxy_http.so
 #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
 +</code>
 +
 +Instead, maybe enable the appropriate apache proxy modules, and restart apache server:
 +
 +<code>
 +sudo a2enmod proxy
 +
 +sudo a2enmod proxy_http
 +
 +sudo systemctl restart apache2
 </code> </code>
  
Line 25: Line 33:
 ProxyPassReverse "/foo" "http://foo.example.com/bar" ProxyPassReverse "/foo" "http://foo.example.com/bar"
 </code> </code>
 +
 +
 +**SEE the following PER ABOVE**  This is from Ubuntu server guide
 +
 +[[https://assets.ubuntu.com/v1/09200365-ubuntu-server-guide-2023-07-11.pdf]]
 +
 +
 +Configure apache2
 +
 +Apache2 is configured by placing directives in plain text configuration files in /etc/apache2/. These directives are
 +
 +separated between the following files and directories:
 +
 +
 +Files
 +
 +• apache2.conf
 +The main Apache2 configuration file. Contains settings that are global to Apache2.
 +Note: Historically, the main Apache2 configuration file was httpd.conf, named after the “httpd”
 +daemon. In other distributions (or older versions of Ubuntu), the file might be present. In modern
 +releases of Ubuntu, all configuration options have been moved to apache2.conf and the below referenced
 +directories and httpd.conf no longer exists.
 +
 +• envvars
 +File where Apache2 environment variables are set.
 +
 +• magic
 +Instructions for determining MIME type based on the first few bytes of a file.
 +
 +• ports.conf
 +Houses the directives that determine which TCP ports Apache2 is listening on
 +
 +
 +**Tutorial - Running a Reverse Proxy in Apache**
 +
 +[[http://www.apachetutor.org/admin/reverseproxies]]
 +
 +**Virtual Host Examples**
 +
 +[[https://httpd.apache.org/docs/2.4/vhosts/examples.html]]
apache_module_mod_proxy.1689100373.txt.gz · Last modified: 2023/07/11 18:32 by wikiadmin