[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-users
Subject:    [users@httpd] Re: proxypass to thin except /awstats
From:       Doğan Çeçen <sepeth () gmail ! com>
Date:       2011-10-27 19:23:21
Message-ID: CAPO2ZYc+cSiGoaD2v4rMJGR2PEVw=crUgOTAvcG7a+oANABf8g () mail ! gmail ! com
[Download RAW message or body]

Oops! Gmail screwed with newlines. Let me try again:

<VirtualHost *:9880>
    DocumentRoot    /srv/http/app/public
    ServerName  example.com
    ServerAlias  www.example.com
    ErrorLog        /var/log/apache2/example.com-error.log
    CustomLog       /var/log/apache2/example.com-access.log combined

    Alias /awstatsclasses "/usr/share/awstats/lib/"
    Alias /awstats-icon/ "/usr/share/awstats/icon/"
    Alias /awstatscss "/usr/share/doc/awstats/examples/css"
    ScriptAlias /awstats/ /usr/lib/cgi-bin/

    <Location /awstats>
        Order deny,allow
        Deny from all
        AuthUserFile /etc/awstats/awstats-htpasswd
        AuthName "Password protected"
        AuthType Basic
        Require valid-user
        Satisfy any
    </Location>

    <Proxy balancer://thinservers>
        BalancerMember http://127.0.0.1:5000
        BalancerMember http://127.0.0.1:5001
        BalancerMember http://127.0.0.1:5002
    </Proxy>

    RewriteEngine On
    # Redirect all non-static requests to thin
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
    RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L]

    ProxyPass /awstats !
    ProxyPass / balancer://thinservers/
    ProxyPassReverse / balancer://thinservers/
    ProxyPreserveHost on

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
</VirtualHost>

[Attachment #3 (text/html)]

Oops! Gmail screwed with newlines. Let me try again:
<div><br></div><div><div><font class="Apple-style-span" size="1" face="&#39;courier \
new&#39;, monospace">&lt;VirtualHost *:9880&gt;</font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
DocumentRoot    /srv/http/app/public</font></div> <div><font class="Apple-style-span" \
size="1" face="&#39;courier new&#39;, monospace">    ServerName  <a \
href="http://example.com">example.com</a></font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
ServerAlias  <a href="http://www.example.com">www.example.com</a></font></div> \
<div><font class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace"> \
ErrorLog        /var/log/apache2/example.com-error.log</font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
CustomLog       /var/log/apache2/example.com-access.log combined</font></div> \
<div><font class="Apple-style-span" size="1" face="&#39;courier new&#39;, \
monospace"><br></font></div><div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">    Alias /awstatsclasses \
&quot;/usr/share/awstats/lib/&quot;</font></div> <div><font class="Apple-style-span" \
size="1" face="&#39;courier new&#39;, monospace">    Alias /awstats-icon/ \
&quot;/usr/share/awstats/icon/&quot;</font></div><div><font class="Apple-style-span" \
size="1" face="&#39;courier new&#39;, monospace">    Alias /awstatscss \
&quot;/usr/share/doc/awstats/examples/css&quot;</font></div> <div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
ScriptAlias /awstats/ /usr/lib/cgi-bin/</font></div></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace"><br> \
</font></div><div><font class="Apple-style-span" size="1" face="&#39;courier \
new&#39;, monospace">    &lt;Location /awstats&gt;</font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">        \
Order deny,allow</font></div> <div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">        Deny from all</font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">        \
AuthUserFile /etc/awstats/awstats-htpasswd</font></div> <div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">        \
AuthName &quot;Password protected&quot;</font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">        \
AuthType Basic</font></div> <div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">        Require \
valid-user</font></div><div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">        Satisfy any</font></div> <div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
&lt;/Location&gt;</font></div><div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace"><br></font></div> <div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
&lt;Proxy balancer://thinservers&gt;</font></div><div><font class="Apple-style-span" \
size="1" face="&#39;courier new&#39;, monospace">        BalancerMember <a \
href="http://127.0.0.1:5000">http://127.0.0.1:5000</a></font></div> <div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">        \
BalancerMember <a href="http://127.0.0.1:5001">http://127.0.0.1:5001</a></font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">        \
BalancerMember <a href="http://127.0.0.1:5002">http://127.0.0.1:5002</a></font></div> \
<div><font class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace"> \
&lt;/Proxy&gt;</font></div><div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace"><br></font></div><div> <font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
RewriteEngine On</font></div><div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">    # Redirect all non-static requests to \
thin</font></div> <div><font class="Apple-style-span" size="1" face="&#39;courier \
new&#39;, monospace">    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \
!-f</font></div><div><font class="Apple-style-span" size="1" face="&#39;courier \
new&#39;, monospace">    RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} \
[P,QSA,L]</font></div> <div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace"><br></font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
ProxyPass /awstats !</font></div> <div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">    ProxyPass / \
balancer://thinservers/</font></div><div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">    ProxyPassReverse / \
balancer://thinservers/</font></div> <div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">    ProxyPreserveHost \
on</font></div><div><font class="Apple-style-span" size="1" face="&#39;courier \
new&#39;, monospace"><br></font></div> <div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">    &lt;Proxy *&gt;</font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">        \
Order deny,allow</font></div> <div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, monospace">        Allow from all</font></div><div><font \
class="Apple-style-span" size="1" face="&#39;courier new&#39;, monospace">    \
&lt;/Proxy&gt;</font></div> <div><font class="Apple-style-span" size="1" \
face="&#39;courier new&#39;, \
monospace">&lt;/VirtualHost&gt;</font></div></div><div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic