ユーザ用ツール

サイト用ツール


サイドバー

このページの翻訳:



最近の更新



Tag Cloud

01_linux:02_www:13_mod_line_edit

13 mod_line_edit

ページに広告や、ステージングと分かりやすい用に表示を入れる。

インストール

epel

# yum install epel-release
# sed -i 's/^enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo

mod_line_edit

# yum --enablerepo=epel install mod_line_edit

ソースRPMから

いつの間にかパッケージが無くなってた。。。

# 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

Apache

mod_line_edit

下記は「</body>」を書き換えるパターン

<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>
01_linux/02_www/13_mod_line_edit.txt · 最終更新: 2017/06/21 10:54 by matsui