[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: po-debconf 訳: slbackup-php



西山和広ã§ã™ã€‚

At Sat, 31 Oct 2009 11:23:50 +0900,
Hideki Yamane wrote:
> 
> On Fri, 30 Oct 2009 19:00:15 +0900
> Kazuhiro NISHIYAMA <zn@xxxxxxxxxxxxx> wrote:
> > > "However, SSL should also be activated in the web server which will not be "
> > > "done by choosing this option."
> > > msgstr ""
> > > "ã—ã‹ã—ã€SSL ã¯ã“ã®ã‚ªãƒ—ションをé¸ã‚“ã§ã‚‚設定ã•ã‚Œãªã„ウェブサーãƒã§ã‚ã£ã¦ã‚‚"
> > > "有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
> > 
> > ã“ã®ã‚ªãƒ—ションをé¸ã°ãªãã¦ã‚‚web serverã§ã™ã§ã«SSLãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚Œã°
> > 有効ã«ãªã‚‹ã¨ã„ã†ã‚ˆã†ãªã“ã¨ã‚’言ã„ãŸã„ã®ã ã¨æ€ã£ãŸã®ã§ã™ãŒã€ã©ã†è¨³ã›ã°
> > ã„ã„ã®ã‹ã¯ã‚ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚
> 
>  "ã—ã‹ã—ã€ã“ã®è¨­å®šã‚’é¸ã°ãªãã¦ã‚‚ウェブサーãƒã§ SSL を有効ã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ã€‚"
>  ã§ã€ã©ã†ã§ã—ょã†ã‹ã€‚

apt-get source slbackup-php ã§ã‚½ãƒ¼ã‚¹ã‚’ã¿ã¦ã¿ã‚‹ã¨ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¦ã€
mod_rewrite 㨠mod_ssl ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„れ㰠SSL 有効ã«ãªã‚‹ã¨ã„ã†ã“ã¨ã«
ã¿ãˆã¾ã™ã€‚
slbackup-php/use-ssl ã‚’é¸ã¶ã¨ mod_rewrite ã ã‘㌠a2enmod ã•ã‚Œã¦æœ‰åŠ¹ã«ãªã£ã¦ã€
mod_ssl ã®è¨­å®šã¯ã„ã˜ã‚‰ãªã„よã†ã«ãªã£ã¦ã„るよã†ã§ã™ã€‚

ã¨ã„ã†ã“ã¨ã§ã‚‚ã†ä¸€åº¦è€ƒãˆç›´ã—ã¦ã¿ãŸã¨ã“ã‚ã€å…ˆã®ãƒ¡ãƒ¼ãƒ«ã®è§£é‡ˆã¯é–“é•ã„ã§ã€
ã“ã®ã‚ªãƒ—ションをé¸ã°ãªã„å ´åˆ(mod_rewrite 㧠http ã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚ŒãŸå ´åˆã«
https ã®æ–¹ã«è‡ªå‹•ã§ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã™ã‚‹è¨­å®šã‚’使ã‚ãªã„å ´åˆ)ã§ã‚‚〠SSL を有効ã«
ã™ã‚‹ã“ã¨ã‚’推奨ã™ã‚‹ã¨ã„ã†è©±ã§ã¯ãªã„ã‹ã¨æ€ã„ã¾ã—ãŸã€‚


% cat etc/apache.conf 
<IfModule mod_rewrite.c>
  <IfModule mod_ssl.c>
    <Location /slbackup-php>
      RewriteEngine on
      RewriteCond %{HTTPS} !^on$ [NC]
      RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI}  [L]
    </Location>
  </IfModule>
</IfModule>

Alias /slbackup-php "/usr/share/slbackup-php/web"
<Directory "/usr/share/slbackup-php/web">
   DirectoryIndex index.php
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>
% cat debian/links      
etc/slbackup-php/apache.conf etc/apache2/conf.d/slbackup
% cat -T debian/postinst
#!/bin/sh

set -e

. /usr/share/debconf/confmodule

db_get slbackup-php/use-ssl || true

if [ "$RET" = "true" ]; then
		if  [ -x /usr/sbin/a2enmod ]; then
				/usr/sbin/a2enmod rewrite > /dev/null
				if [ -x /usr/sbin/invoke-rc.d ] ; then
						/usr/sbin/invoke-rc.d apache2 force-reload || :
				else
						[ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || :
				fi
		fi
fi

mkdir -p /var/spool/slbackup-php

if [ -d /var/spool/slbackup-php ]; then
	chown www-data:www-data /var/spool/slbackup-php/
fi

db_stop

#DEBHELPER#
%


-- 
|ZnZ(ゼット エヌ ゼット)
|西山和広(Kazuhiro NISHIYAMA)