Difference between revisions of "Httpd"

From Colettapedia
Jump to navigation Jump to search
m (Colettace moved page Apache to Httpd)
Line 1: Line 1:
==httpd.conf==
+
==General==
===Virtual Hosts===
+
* [https://httpd.apache.org/docs/2.4/mod/core.html Apache server core feeatures and directives]
 +
 
 +
==Virtual Hosts==
 
* [https://httpd.apache.org/docs/2.4/vhosts/index.html Virtual Host documentation]
 
* [https://httpd.apache.org/docs/2.4/vhosts/index.html Virtual Host documentation]
 
* [https://httpd.apache.org/docs/2.4/vhosts/examples.html Virtual Host examples]
 
* [https://httpd.apache.org/docs/2.4/vhosts/examples.html Virtual Host examples]
 
* "The term Virtual Host refers to the practice of running more than one web site (such as company1.example.com and company2.example.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user."
 
* "The term Virtual Host refers to the practice of running more than one web site (such as company1.example.com and company2.example.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user."
===Configuring reverse proxy===
+
* [https://httpd.apache.org/docs/2.4/mod/core.html#virtualhost VirtualHost directive]
 +
** Contains directives that apply only to a specific hostname or IP address
 +
 
 +
<pre>
 +
 
 +
<VirtualHost 10.1.2.3:80>
 +
  ServerAdmin webmaster@host.example.com
 +
  DocumentRoot "/www/docs/host.example.com"
 +
  ServerName host.example.com
 +
  ErrorLog "logs/host.example.com-error_log"
 +
  TransferLog "logs/host.example.com-access_log"
 +
</VirtualHost>
 +
 
 +
</pre>
 +
 
 +
==Configuring reverse proxy==
 
* [https://httpd.apache.org/docs/2.4/mod/mod_proxy.html mod_proxy] - Multi-protocol proxy/gateway server
 
* [https://httpd.apache.org/docs/2.4/mod/mod_proxy.html mod_proxy] - Multi-protocol proxy/gateway server
 
* rstudio.conf
 
* rstudio.conf

Revision as of 14:28, 17 July 2019

General

Virtual Hosts

  • Virtual Host documentation
  • Virtual Host examples
  • "The term Virtual Host refers to the practice of running more than one web site (such as company1.example.com and company2.example.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user."
  • VirtualHost directive
    • Contains directives that apply only to a specific hostname or IP address

<VirtualHost 10.1.2.3:80>
  ServerAdmin webmaster@host.example.com
  DocumentRoot "/www/docs/host.example.com"
  ServerName host.example.com
  ErrorLog "logs/host.example.com-error_log"
  TransferLog "logs/host.example.com-access_log"
</VirtualHost>

Configuring reverse proxy

  • mod_proxy - Multi-protocol proxy/gateway server
  • rstudio.conf

    <VirtualHost *:80>

      <Proxy *>
        Allow from localhost
      </Proxy>

      ProxyPass        /rstudio/ http://localhost:8787/
      ProxyPassReverse /rstudio/ http://localhost:8787/
      RedirectMatch permanent ^/rstudio$ /rstudio/

    </VirtualHost>