Narzędzia użytkownika

Narzędzia witryny


apache

Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

Poprzednia rewizja po obu stronachPoprzednia wersja
Nowa wersja
Poprzednia wersja
apache [2013/02/22 13:41] kamilapache [2018/07/16 11:47] (aktualna) – edycja zewnętrzna 127.0.0.1
Linia 1: Linia 1:
-== Instalacja ==+===== Apache =====
  
-=== Centos === +==== Proste konfiguracje ====
- +
-''yum install httpd-tools httpd''+
  
 === Sprawdzenie konfiguracji === === Sprawdzenie konfiguracji ===
Linia 29: Linia 27:
  
 </VirtualHost> </VirtualHost>
 +</file>
 +
 +==== PHP via FCGID + SuEXEC ====
 +
 +=== Konfiguracja Apache ===
 +
 +<file>
 +<VirtualHost *:80>
 +
 +        SuexecUserGroup kamil users
 +
 +        ErrorLog /home/services/httpd/users/kamil/test.com.pl/error.log
 +        TransferLog /home//services/httpd/users/kamil/test.com.pl/access.log
 +
 +        <Directory /home/services/httpd/users/kamil/test.com.pl/htdocs>
 +                Options ExecCGI Indexes Includes FollowSymLinks MultiViews
 +                AllowOverride All
 +                Order allow,deny
 +                Allow from all
 +                AddHandler fcgid-script .php
 +                FCGIWrapper /home/services/httpd/users/kamil/test.com.pl/fcgid/php.fcgi .php
 +        </Directory>
 +
 +        ServerAdmin kamil@test.com.pl
 +        DocumentRoot /home/services/httpd/users/kamil/test.com.pl/htdocs
 +
 +        ServerName test.com.pl
 +
 +</VirtualHost>
 +</file>
 +
 +=== Struktura katalogów ===
 +
 +<file>
 +chown -R kamil:http /home/services/httpd/users/kamil
 +chmod -R 710 /home/services/httpd/users/kamil
 +chown kamil:http /home/services/httpd/users/kamil/test.com.pl/{htdocs,tmp}
 +chmod -R 750 /home/services/httpd/users/kamil/test.com.pl/{htdocs,tmp}
 +chown kamil:users /home/services/httpd/users/kamil/test.com.pl/fcgid
 +chmod -R 711 /home/services/httpd/users/kamil/test.com.pl/fcgid
 +</file>
 +
 +Plik /home/services/httpd/users/kamil/test.com.pl/fcgid/php.fcgi:
 +
 +<file>
 +#!/bin/sh
 +
 +export PHP_FCGI_CHILDREN=4
 +export PHP_FCGI_MAX_REQUESTS=500
 +exec /usr/bin/php.fcgi $@
 +</file>
 +
 +Uprawnienia:
 +
 +<file>
 +chmod 700 /home/services/httpd/users/kamil/test.com.pl/fcgid/php.fcgi
 +chown kamil:users /home/services/httpd/users/kamil/test.com.pl/fcgid/php.fcgi
 +</file>
 +
 +=== Restartujemy Apache i sprawdzamy ===
 +
 +<file>
 +/etc/init.d/httpd start
 +Uruchamianie usługi Apache 2.2 Web Server (prefork)................[ ZROBIONE ]
 +ps aux | grep httpd
 +root      2508  0.0  0.7   7988  3936 ?        SNs  15:28   0:00 /usr/sbin/httpd.prefork
 +http      2512  0.0  0.4   7924  2276 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +http      2513  0.0  0.4   7988  2252 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +http      2514  0.0  0.5   8192  2940 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +http      2515  0.0  0.4   7988  2240 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +http      2516  0.0  0.5   8120  2756 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +http      2517  0.0  0.5   8120  2844 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +http      2518  0.0  0.4   7988  2240 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +http      2519  0.0  0.4   7988  2240 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +http      2520  0.0  0.4   7988  2240 ?        SN   15:28   0:00 /usr/sbin/httpd.prefork
 +root      2568  0.0  0.1   2808   844 pts/0    S+   15:53   0:00 grep httpd
 +[root@pld_fcgid /]# pstree -up 2508
 +httpd.prefork(2508)-+-httpd.prefork(2512,http)---php.fcgi(2526,kamil)-+-php.fcgi(2527)
 +                    |                                                 |-php.fcgi(2528)
 +                    |                                                 |-php.fcgi(2529)
 +                    |                                                 `-php.fcgi(2530)
 +                    |-httpd.prefork(2513,http)
 +                    |-httpd.prefork(2514,http)
 +                    |-httpd.prefork(2515,http)
 +                    |-httpd.prefork(2516,http)
 +                    |-httpd.prefork(2517,http)
 +                    |-httpd.prefork(2518,http)
 +                    |-httpd.prefork(2519,http)
 +                    `-httpd.prefork(2520,http)
 </file> </file>
apache.1361536874.txt.gz · ostatnio zmienione: 2018/07/16 11:47 (edycja zewnętrzna)