CONTENTS
#contents
----
Lastmodified &lastmod;
----
*Apache22 to 24 [#k7e3a222]
* Apache22 to 24 [#sf71a1b1]
Apacheを22から24へ移行します。Apache22を使用している状態では、/etc/make.conf に、
 
 DEFAULT_VERSIONS+=apache=2.2

403 アクセスコントロールの構文がかわりました。( ̄^ ̄)ゞ
があると思いますが、これを消去(コメントアウト?)します。でないと、Apache24インストール後に、mod_php5とかが入りません。

phpMyAdminのインストール後、403が取れずに半日嵌まったワ orz
 # portinstall www/apache24

http://ora.geo.jp/?p=246
すると、/usr/local/etc/apache24 に設定ファイルが出来ます。が、apache22のディレクトリも残っています。

ただし、Apache22 と 24 では設定方法やデフォルトのmodなどが大きく異なっていて、22の設定ファイルをそのまま持ってきても殆ど動きません。

 ===>   Registering installation for mod_php5-5.4.32,1
 [activating module `php5' in /usr/local/etc/apache24/httpd.conf]
 ***************************************************************
ということで、22から24へ変更した場合、httpd.confを直接編集しても良いのですが、/usr/local/etc/apache24/httpd.conf の差分?を、/usr/local/etc/apache24/Includes にまとめてしまおうと思います。

** /usr/local/etc/apache24/Includes [#l61ace26]

*** php.conf [#h0472915]

php5, php5-extensions をインストールしたら、/usr/local/etc/apache24/Includes/php.conf を作り、apacheを再起動します。

 ########### PHP Setting for Apache24 or later ##########
 <IfModule mime_module>
 	AddType application/x-httpd-php .php
 	AddType application/x-httpd-php-source .phps
 </IfModule>
 
 Make sure index.php is part of your DirectoryIndex.
 <IfModule dir_module>
 	DirectoryIndex index.html index.php
 </IfModule>
 
 You should add the following to your Apache configuration file:
 <IfModule dir_module>
 	
 	<FilesMatch "\.php$">
     	SetHandler application/x-httpd-php
 	</FilesMatch>
 	<FilesMatch "\.phps$">
     	SetHandler application/x-httpd-php-source
 	</FilesMatch>
 </IfModule>



*** cgi-bin.conf [#r259bf0c]

mailman を導入した場合、cgiが動くように、/usr/local/etc/apache24/Includes/cgi-bin.confを作ります。

 <IfModule !mpm_prefork_module>
 	LoadModule cgid_module libexec/apache24/mod_cgid.so
 </IfModule>
 <IfModule mpm_prefork_module>
 	LoadModule cgi_module libexec/apache24/mod_cgi.so
 </IfModule>

** アプリケーション毎の設定 [#wc48e4f6]
*** wordpress.conf アクセス制限無しの場合 [#nb45bdda]

   Alias /wordpress /usr/local/www/wordpress/
     AcceptPathInfo On
   <Directory /usr/local/www/wordpress>
       AllowOverride None
       Require all granted
 #      Order Allow,Deny  #Apache22だとこちらでOKだった
 #      Allow from all
   </Directory>


*** mailman アクセス制限無しの場合 [#q1c5d079]
 <IfModule alias_module>
     ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/" 
     Alias /pipermail/ "/usr/local/mailman/archives/public/"
     Alias /icons/ "/usr/local/mailman/icons/"
 </IfModule>
 
 <FilesMatch "\.php$">
     SetHandler application/x-httpd-php
 </FilesMatch>
 <FilesMatch "\.phps$">
     SetHandler application/x-httpd-php-source
 </FilesMatch>
 
 ***************************************************************
 
 ===> SECURITY REPORT:
       This port has installed the following files which may act as network
       servers and may therefore pose a remote security risk to the system.
 /usr/local/libexec/apache24/libphp5.so
 
       If there are vulnerabilities in these programs there may be a security
       risk to the system. FreeBSD makes no guarantee about the security of
       ports included in the Ports Collection. Please type 'make deinstall'
       to deinstall the port if this is a concern.
 
       For more information, and contact details about the security
       status of this software, see the following webpage:
 http://www.php.net/
 
*phpMyAdmin [#jf71df5c]
 <Directory "/usr/local/mailman/">
  Options FollowSymLinks ExecCGI
  AllowOverride None
  Require all granted
 </Directory>

 phpMyAdmin-4.2.7.1 has been installed into:
*** phpmyadmin.conf アクセス制限有りの場合 [#t2e612e5]

 Alias /phpmyadmin "/usr/local/www/phpMyAdmin/"
 
     /usr/local/www/phpMyAdmin
 <Directory "/usr/local/www/phpMyAdmin/">
     #Options Indexes FollowSymLinks ExecCGI
     Options none
     #AllowOverride ALL
     AllowOverride Limit
 
 Please edit config.inc.php to suit your needs.
     Require local
     Require ip 172.16.XXX.YYY
     #Require all granted
 
 To make phpMyAdmin available through your web site, I suggest
 that you add something like the following to httpd.conf:
 
 For Apache versions earlier than 2.4:
 
     Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
 
     <Directory "/usr/local/www/phpMyAdmin/">
         Options none
         AllowOverride Limit
 
         Order Deny,Allow
         Deny from all
         Allow from 127.0.0.1 .example.com
     </Directory>
 
 For Apache version 2.4.x or above:
 
     Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
 
     <Directory "/usr/local/www/phpMyAdmin/">
         Options None
         AllowOverride Limit
  
         Require local
         Require host .example.com
     </Directory>
 
 SECURITY NOTE: phpMyAdmin is an administrative tool that has had several
 remote vulnerabilities discovered in the past, some allowing remote
 attackers to execute arbitrary code with the web server's user credential.
 All known problems have been fixed, but the FreeBSD Security Team strongly
 advises that any instance be protected with an additional protection layer,
 e.g. a different access control mechanism implemented by the web server
 as shown in the example.  Do consider enabling phpMyAdmin only when it
 is in use.
 
 ===>  Cleaning for phpMyAdmin-4.2.7.1

     Require host	.smb.net
     Require host	.hogehoge.net
     Require host	.fugafuga.info
 </Directory>
  
----
Total access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday);
#counter([total|today|yesterday]);


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS