Difference between revisions of "Httpd"

From Colettapedia
Jump to navigation Jump to search
Line 1: Line 1:
 
==httpd.conf==
 
==httpd.conf==
<pre>
+
===Configuring reverse proxy===
diff /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.old
+
* [https://httpd.apache.org/docs/2.4/mod/mod_proxy.html mod_proxy] - Multi-protocol proxy/gateway server
244c244
+
* rstudio.conf:<pre>
< Group www
+
<VirtualHost *:80>
---
+
 
> Group apache
+
  <Proxy *>
263c263
+
     Allow from localhost
< ServerAdmin christopher.coletta@gmail.com
+
  </Proxy>
---
+
 
> ServerAdmin root@localhost
+
  ProxyPass        /rstudio/ http://localhost:8787/
293c293
+
  ProxyPassReverse /rstudio/ http://localhost:8787/
< DocumentRoot "/var/www/default"
+
  RedirectMatch permanent ^/rstudio$ /rstudio/
---
+
 
> DocumentRoot "/var/www/html"
+
</VirtualHost>
318c318
 
< <Directory "/var/www/default">
 
---
 
> <Directory "/var/www/html">
 
339c339
 
<    AllowOverride All
 
---
 
>    AllowOverride None
 
457c457
 
< HostnameLookups On
 
---
 
> HostnameLookups Off
 
991c991
 
< NameVirtualHost *:80
 
---
 
> #NameVirtualHost *:80
 
1004,1025c1004,1010
 
< <VirtualHost *:80>
 
<    ServerName mavisandchris.com
 
<     ServerAlias *.mavisandchris.com
 
<     DocumentRoot /var/www/mavisandchris.com
 
<    ErrorLog logs/mavisandchris.com_logs/error_log
 
<    CustomLog logs/mavisandchris.com_logs/access_log common
 
<         <Directory "/">
 
<            Options Indexes FollowSymLinks
 
<            AllowOverride All
 
<            Order allow,deny
 
<            Allow from all
 
<        </Directory>
 
< </VirtualHost>
 
<
 
< <VirtualHost *:80>
 
<    ServerName nanina.net
 
<    ServerAlias *.nanina.net
 
<    DocumentRoot /var/www/nanina.net
 
<    ErrorLog logs/nanina.net_logs/error_log
 
<    CustomLog logs/nanina.net_logs/access_log common
 
< </VirtualHost>
 
<
 
---
 
> #<VirtualHost *:80>
 
> #    ServerAdmin webmaster@dummy-host.example.com
 
> #    DocumentRoot /www/docs/dummy-host.example.com
 
> #    ServerName dummy-host.example.com
 
> #    ErrorLog logs/dummy-host.example.com-error_log
 
> #    CustomLog logs/dummy-host.example.com-access_log common
 
> #</VirtualHost>
 
 
</pre>
 
</pre>

Revision as of 14:10, 17 July 2019

httpd.conf

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>