ユーザ用ツール

サイト用ツール


apache

差分

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

この比較画面へのリンク

次のリビジョン
前のリビジョン
apache [2014/02/20 23:54] – 作成 nabezoapache [2020/04/11 02:09] (現在) – [ubuntuでの設定] nabezo
行 1: 行 1:
-Tomcat+=====インストール(CentOS)===== 
 +ここではCentOSのことに記載します。
  
-メモリ使用量+  # yum install httpd 
 +   
 +  Loaded plugins: rhnplugin, security 
 +  Setting up Install Process 
 +  Resolving Dependencies 
 +  --> Running transaction check 
 +  ---> Package httpd.i386 0:2.2.3-45.el5_6.1 set to be updated 
 +  --> Processing Dependency: libaprutil-1.so.0 for package: httpd 
 +  --> Processing Dependency: libapr-1.so.0 for package: httpd 
 +  --> Running transaction check 
 +  ---> Package apr.i386 0:1.2.7-11.el5_6.4 set to be updated 
 +  ---> Package apr-util.i386 0:1.2.7-11.el5_5.2 set to be updated 
 +  --> Processing Dependency: libpq.so.4 for package: apr-util 
 +  --> Running transaction check 
 +  ---> Package compat-postgresql-libs.i686 0:4-1PGDG.rhel5 set to be updated 
 +  --> Finished Dependency Resolution 
 +   
 +  Dependencies Resolved 
 +  =================================================================================================  
 +   Package                      Arch       Version                  Repository                Size 
 +  ================================================================================================= 
 +  Installing: 
 +   httpd                        i386       2.2.3-45.el5_6.1         rhel-i386- server-5       1.2 M 
 +  Installing for dependencies: 
 +   apr                          i386       1.2.7-11.el5_6.4         rhel-i386-server-5       124 k 
 +   apr-util                     i386       1.2.7-11.el5_5.2         rhel-i386-server-5        80 k 
 +   compat-postgresql-libs       i686       4-1PGDG.rhel5            pgdg84                    63 k 
 +   
 +  Transaction Summary 
 +  ================================================================================================= 
 +  Install       4 Package(s) 
 +  Upgrade       0 Package(s) 
 +  
  
-http://thinkit.co.jp/article/119/3?page=0,1+=====Redhat系環境=====
  
-JVM+設定ファイル/etc/httpd/conf/httpd.conf 
 +ServerRoot /etc/httpd
  
-http://d.hatena.ne.jp/learn/20090218/p1+ /var/www
  
-ここではCentOSのことに記載します。 +====ネック設定====
-インストール †+
  
-# yum install httpd+  lokkit -q -port=http:tcp
  
-Loaded plugins: rhnplugin, security +====apache.conf 設定方法====
-Setting up Install Process +
-Resolving Dependencies +
---> Running transaction check +
----> Package httpd.i386 0:2.2.3-45.el5_6.1 set to be updated +
---> Processing Dependency: libaprutil-1.so.0 for package: httpd +
---> Processing Dependency: libapr-1.so.0 for package: httpd +
---> Running transaction check +
----> Package apr.i386 0:1.2.7-11.el5_6.4 set to be updated +
----> Package apr-util.i386 0:1.2.7-11.el5_5.2 set to be updated +
---> Processing Dependency: libpq.so.4 for package: apr-util +
---> Running transaction check +
----> Package compat-postgresql-libs.i686 0:4-1PGDG.rhel5 set to be updated +
---> Finished Dependency Resolution+
  
-Dependencies Resolved +* /etc/httpd/conf/httpd.conf †
-================================================================================================= +
- Package                      Arch       Version                  Repository                Size +
-================================================================================================= +
-Installing: +
- httpd                        i386       2.2.3-45.el5_6.1         rhel-i386- server-5       1.2 M +
-Installing for dependencies: +
- apr                          i386       1.2.7-11.el5_6.4         rhel-i386-server-5       124 k +
- apr-util                     i386       1.2.7-11.el5_5.2         rhel-i386-server-5        80 k +
- compat-postgresql-libs       i686       4-1PGDG.rhel5            pgdg84                    63 k+
  
-Transaction Summary +Apacheの基本的な設定を行ないます。ドキュメントルートや全体的な挙動設定など。通常のディレクティブ設定も行なえます。ここのファイルで既述されたディレクティブ設定が最優先され、conf.d に同じディレクトリに対しての設定があった場合はここで記述された設定を無視します。
-================================================================================================= +
-Install       4 Package(s) +
-Upgrade       0 Package(s)+
  
-↑ +====変更内容====
-Redhat系環境 †+
  
-設定ファイル/etc/httpd/conf/httpd.conf +  Options Indexes FollowSymLinks → Options Indexes ExecCGI FollowSymLinks 
-ServerRoot? /etc/httpd+  AllowOverride None → AllowOverride All 
 +  AddType application/x-httpd-php .php 
 +  AddHandler cgi-script .cgi → AddHandler cgi-script .cgi .pl
  
-/var/www 
  
-↑ +* /etc/httpd/conf.d/ssl.conf
-ネットワーク設定 †+
  
-lokkit -q -port=http:tcp +SSLに関する基本的な設定を行なうファイルです。(サーバー証明書によるSSL化やクライアント認証等)  
-↑ +SSLに関するディレクティブ設定も行なえますが、通常、このファイルでは 指定しません。 
-apache.conf 設定方法 † +指定した場合は以下に説明する " 任意.conf " よりも優先に評価されます。
-↑ +
-/etc/httpd/conf/httpd.conf +
  
-Apacheの基本的な設定を行ないます。ドキュメントルートや全体的な挙動設定など。通常のディレクティブ設定も行なえます。ここのファイルで既述されたディレクティブ設定が最優先され、conf.d に同じディレクトリに対しての設定があった場合はここで記述された設定を無視します。 +/etc/httpd/conf.d/任意.conf †
-↑ +
-変更内容 † +
- +
-Options Indexes FollowSymLinks → Options Indexes ExecCGI FollowSymLinks +
-AllowOverride None → AllowOverride All +
-AddType application/x-httpd-php .php +
-AddHandler cgi-script .cgi → AddHandler cgi-script .cgi .pl +
- +
-↑ +
-/etc/httpd/conf.d/ssl.conf † +
- +
-SSLに関する基本的な設定を行なうファイルです。(サーバー証明書によるSSL化やクライアント認証等)   SSLに関するディレクティブ設定も行なえますが、通常、このファイルでは 指定しません。指定した場合は以下に説明する " 任意.conf " よりも優先に評価されます。 +
-↑ +
-/etc/httpd/conf.d/任意.conf †+
  
 /conf.d/ ディレクトリ内に任意の.conf ファイルを設置することで個別に設定ファイルを管理できるようになります。 /conf.d/ ディレクトリ内に任意の.conf ファイルを設置することで個別に設定ファイルを管理できるようになります。
- + 
-PHP 設定 +=====PHP 設定=====
  
 参考: http://sakura.off-soft.net/centos/php_cgi_module_exchange.html 参考: http://sakura.off-soft.net/centos/php_cgi_module_exchange.html
行 87: 行 78:
     etc/httpd/conf.d/php.conf     etc/httpd/conf.d/php.conf
  
- +===== Tomcat===== 
-起動方法 +メモリ使用量 
 + 
 +http://thinkit.co.jp/article/119/3?page=0,
 + 
 +JVM 
 + 
 +http://d.hatena.ne.jp/learn/20090218/p1 
 + 
 + 
 +=====起動方法=====
  
-apachectl start +  apachectl start 
-apachectl restart +  apachectl restart 
-apachectl stop+  apachectl stop 
 +   
 +  service httpd start 
 +  service httpd stop 
 +  service httpd restart
  
 +===== ReverseProxy =====
 +  * https://httpd.apache.org/docs/2.4/ja/mod/mod_proxy.html
 +==== ubuntuでの設定 ====
 +mod_proxyを有効にする
 +  sudo a2enmod proxy proxy_http 
 +/etc/apache2/mods-enabled/proxy.conf 
 +  <IfModule mod_proxy.c>
 +    ProxyRequests Off
 +    <Proxy *>
 +        Require all granted
 +    </Proxy>
 +    ProxyPass /mydir http://srv.com/
 +    ProxyPassReverse /mydir http://srv.com/
  
 +mod_rewriteを有効にする
 +  sudo a2enmod proxy proxy_http 
 +/etc/apache2/sites-enabled/000-default.conf
 +  <VirtualHost *:80>
 +    <Directory /var/www/html>
 +        AllowOverride All #これ追加
 +    </Directory>
 +  ...
 +  </VirtualHost>
apache.1392908056.txt.gz · 最終更新: 2019/06/30 12:22 (外部編集)