ユーザ用ツール

サイト用ツール


01_linux:02_www:13_mod_line_edit

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
01_linux:02_www:13_mod_line_edit [2017/01/25 01:45] – [ソースRPMから] matsui01_linux:02_www:13_mod_line_edit [2017/06/21 01:54] (現在) matsui
行 1: 行 1:
 +====== 13 mod_line_edit ======
  
 +ページに広告や、ステージングと分かりやすい用に表示を入れる。
 +
 +===== インストール =====
 +
 +=== epel ===
 +<code>
 +# yum install epel-release
 +# sed -i 's/^enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo
 +</code>
 +
 +=== mod_line_edit ===
 +
 +<code>
 +# yum --enablerepo=epel install mod_line_edit
 +</code>
 +
 +==== ソースRPMから ====
 +
 +いつの間にかパッケージが無くなってた。。。
 +<code>
 +# wget http://rmyers.fedorapeople.org/mod_line_edit/mod_line_edit-1.0.0-2.el5.src.rpm
 +# rpm -ivh mod_line_edit-1.0.0-2.el5.src.rpm
 +# cd /root/rpmbuild/SPECS/
 +# rpmbuild -ba mod_line_edit.spec
 +# cd ../RPMS/x86_64/
 +# rpm -ivh mod_line_edit-1.0.0-2.el6.x86_64.rpm
 +</code>
 +
 +===== Apache =====
 +
 +[[http://apache.webthing.com/mod_line_edit/|mod_line_edit]]
 +
 +下記は「</body>」を書き換えるパターン
 +<code>
 +<VirtualHost *:80>
 +    ServerName hoge.fl8.jp
 +    DocumentRoot /home/www/public_html/hoge
 +    <IfModule !mod_line_edit.c>
 +        LoadModule line_edit_module    modules/mod_line_edit.so
 +    </IfModule>
 +    <IfModule mod_line_edit.c>
 +       LELineEnd UNIX
 +       LERewriteRule </body> "<div style=\"position: fixed; bottom: 0px; width: 100%; height: 1.3em; line-height: 1.3em; z-index: 9999; background-color: red; text-align: center; font-weight:  bold; font-size: 1.3em; color: white;\">ステージングページです</div>\
 +</body>" Ri
 +       SetOutputFilter    line-editor
 +       SetEnv             LineEdit "text/html*"
 +    </IfModule>
 +</VirtualHost>
 +</code>
 +
 +
 +{{tag>apache}}