<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://shiyoka.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://shiyoka.com/feed.php">
        <title>ClownWiki - haproxy</title>
        <description></description>
        <link>https://shiyoka.com/</link>
        <image rdf:resource="https://shiyoka.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-05-08T13:21:28+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=haproxy:install&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=haproxy:log&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=haproxy:report&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=haproxy:ssl&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=haproxy:tips&amp;rev=1739713984&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://shiyoka.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>ClownWiki</title>
        <link>https://shiyoka.com/</link>
        <url>https://shiyoka.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://shiyoka.com/doku.php?id=haproxy:install&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>install</title>
        <link>https://shiyoka.com/doku.php?id=haproxy:install&amp;rev=1739713984&amp;do=diff</link>
        <description>HAProxy

gcc

rpmbuildに必要
gcc他、関連するものを一括でインストール


# yum -y groupinstall &quot;Development Tools&quot;


pcre-devel

rpmbuildに必要


# yum -y install pcre-devel


HAProxyインストール

公式：&lt;http://www.haproxy.org/&gt;
最新：&lt;http://www.haproxy.org/download/1.6/src/haproxy-1.6.5.tar.gz&gt;
（2016/05/20時点）</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=haproxy:log&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>log</title>
        <link>https://shiyoka.com/doku.php?id=haproxy:log&amp;rev=1739713984&amp;do=diff</link>
        <description>ログ出力設定

HAProxy のログを出力する


# vi /etc/sysconfig/syslog



-) #SYSLOGD_OPTIONS=&quot;-m 0&quot;
+) SYSLOGD_OPTIONS=&quot;-m 0 -r&quot;



# vi /etc/syslog.conf



# 全てのログを/var/log/messagesに記録する、ただし、mail、authpriv、cronは取得しない←HAProxyのログ（local0、local1）追加
#*.info;mail.none;authpriv.none;cron.none               /var/log/messages
*.info;mail.none;authpriv.none;cron.none;local0.none;local1.none                /var/log/messages

～ 省略 ～

# HAProxy
local1.*                                                /var/log/haproxy.log…</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=haproxy:report&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>report</title>
        <link>https://shiyoka.com/doku.php?id=haproxy:report&amp;rev=1739713984&amp;do=diff</link>
        <description>Statistics Report


listen stats :23451
    mode http
    stats enable
    #stats hide-version
    
    #Authentication realm. This can be set to anything. Escape space characters with a backslash.
    stats realm Haproxy\ Statistics
    
    #This is the virtual URL to access the stats page
    stats uri /
    
    #The user/pass you want to use. Change this password!
    stats auth Username:Password</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=haproxy:ssl&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssl</title>
        <link>https://shiyoka.com/doku.php?id=haproxy:ssl&amp;rev=1739713984&amp;do=diff</link>
        <description>SSL

※Ver1.5以降でSSL正式サポート（要ソースからインストール）

SSL有効化

ビルド時にspecファイルを編集してオプションを設定する


# cp -r ./haproxy-1.6.5/examples/haproxy.spec ./haproxy-1.6.5/examples/haproxy.spec.org
# vi ./haproxy-1.6.5/examples/haproxy.spec
36c36
&lt; %{__make} USE_PCRE=1 DEBUG=&quot;&quot; ARCH=%{_target_cpu} TARGET=linux26 USE_OPENSSL=1
---
&gt; %{__make} USE_PCRE=1 DEBUG=&quot;&quot; ARCH=%{_target_cpu} TARGET=linux26</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=haproxy:tips&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tips</title>
        <link>https://shiyoka.com/doku.php?id=haproxy:tips&amp;rev=1739713984&amp;do=diff</link>
        <description>Tips

マルチドメインの振り分け


frontend  main *:80
    acl is_adm    hdr_dom(host) -i adm.mono.net
    acl is_app    hdr_dom(host) -i app.mono.net

    use_backend          virtual_adm if is_adm
    default_backend      default_www

backend virtual_adm
    balance     roundrobin
    server      adm01 192.168.24.222:80 check

backend default_www
    balance     roundrobin
    server      web01 192.168.24.225:80 check
    server      web02 192.168.24.226:80 check</description>
    </item>
</rdf:RDF>
