Advertisement
Guest User

apache2-php(5.6+7.0)-fpm

a guest
Nov 27th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /etc/hosts:
  2. 127.0.0.1   localhost
  3. 127.0.1.1   adam-desktop
  4.  
  5. 127.0.0.1   php7.home   #php7
  6.  
  7. apache mod: proxy, proxy_fcgi enabled
  8.  
  9. php5:
  10. /etc/php5/fpm/pool.d/www.conf:
  11. [www]
  12. user = www-data
  13. group = www-data
  14. listen = 127.0.0.1:9000
  15. listen.allowed_clients = 127.0.0.1
  16.  
  17.  
  18. php7:
  19. /opt/php-7.0/etc/php-fpm.d/www.conf:
  20. [www]
  21. user = www-data
  22. group = www-data
  23. listen = 127.0.0.2:8999
  24. listen.allowed_clients = 127.0.0.2
  25.  
  26. ************************************************************************************************
  27.  
  28. /etc/apache2/sites-available/localhost.conf:
  29. <VirtualHost *:80>
  30.     ServerName localhost
  31.     #ServerAlias www.localhost.com
  32.    
  33.     DocumentRoot /var/www/html/
  34.  
  35.     <Directory /var/www/html>
  36.         #Options -Indexes +FollowSymLinks +MultiViews
  37.         #AllowOverride All
  38.         Require all granted
  39.     </Directory>
  40.  
  41.     <FilesMatch \.php$>
  42.         # 2.4.10+ can proxy to unix socket
  43.         # SetHandler "proxy:unix:/var/run/php7-fpm.sock|fcgi://localhost/"
  44.  
  45.         # Else we can just use a tcp socket:
  46.         SetHandler "proxy:fcgi://127.0.0.1:9000"
  47.     </FilesMatch>
  48.  
  49.     ErrorLog /var/www/logs/001-localhost-error.log
  50.  
  51.     # Possible values include: debug, info, notice, warn, error, crit,
  52.     # alert, emerg.
  53.     LogLevel warn
  54.  
  55.     CustomLog /var/www/logs/001-localhost-access.log combined
  56.  
  57. </VirtualHost>
  58.  
  59. ************************************************************************************************
  60.  
  61. /etc/apache2/sites-available/php7.conf:
  62. <VirtualHost *:80>
  63.     ServerName php7.home
  64.     #ServerAlias www.php7.home
  65.    
  66.     DocumentRoot /var/www/html/php7/
  67.  
  68.    
  69.  
  70.     <Directory /var/www/html/php7>
  71.         #Options -Indexes +FollowSymLinks +MultiViews
  72.         #AllowOverride All
  73.         Require all granted
  74.     </Directory>
  75.  
  76.     <FilesMatch \.php$>
  77.         # 2.4.10+ can proxy to unix socket
  78.         # SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/"
  79.  
  80.         # Else we can just use a tcp socket:
  81.         SetHandler "proxy:fcgi://127.0.0.1:9000"
  82.         Action application/x-httpd-php "/opt/php-7.0/bin/php"
  83.     </FilesMatch>
  84.  
  85.     ErrorLog /var/www/logs/001-localhost-error.log
  86.  
  87.     # Possible values include: debug, info, notice, warn, error, crit,
  88.     # alert, emerg.
  89.     LogLevel warn
  90.  
  91.     CustomLog /var/www/logs/001-localhost-access.log combined
  92.  
  93. </VirtualHost>
  94.  
  95. ************************************************************************************************
  96.  
  97. phpinfo() kimenet (5.6.15):
  98. PHP Version 5.6.15-1+deb.sury.org~trusty+1
  99. System.......................................................Linux adam-desktop 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64
  100. Server API...................................................FPM/FastCGI
  101. Virtual Directory Support....................................disabled
  102. Configuration File (php.ini) Path............................/etc/php5/fpm
  103. Loaded Configuration File..................................../etc/php5/fpm/php.ini
  104. Scan this dir for additional .ini files....................../etc/php5/fpm/conf.d
  105. stb...
  106.  
  107. phpinfo() kimenet (7.0.0):
  108.  
  109. PHP Version 5.6.15-1+deb.sury.org~trusty+1
  110. System.......................................................Linux adam-desktop 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64
  111. Server API...................................................FPM/FastCGI
  112. Virtual Directory Support....................................disabled
  113. Configuration File (php.ini) Path............................/etc/php5/fpm
  114. Loaded Configuration File..................................../etc/php5/fpm/php.ini
  115. Scan this dir for additional .ini files....................../etc/php5/fpm/conf.d
  116. stb...
  117.  
  118.  
  119. php7-fpm error log: teljes
  120. [26-Nov-2015 23:31:52] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)
  121. [26-Nov-2015 23:31:52] ERROR: FPM initialization failed
  122. [26-Nov-2015 23:33:10] NOTICE: fpm is running, pid 5377
  123. [26-Nov-2015 23:33:10] NOTICE: ready to handle connections
  124. [26-Nov-2015 23:34:55] ERROR: unable to bind listening socket for address '127.0.0.2:8999': Address already in use (98)
  125. [26-Nov-2015 23:34:55] ERROR: FPM initialization failed
  126. [26-Nov-2015 23:35:23] ERROR: unable to bind listening socket for address '127.0.0.2:8999': Address already in use (98)
  127. [26-Nov-2015 23:35:23] ERROR: FPM initialization failed
  128. [26-Nov-2015 23:37:08] ERROR: unable to bind listening socket for address '127.0.0.2:8999': Address already in use (98)
  129. [26-Nov-2015 23:37:08] ERROR: FPM initialization failed
  130. [26-Nov-2015 23:37:52] NOTICE: fpm is running, pid 5803
  131. [26-Nov-2015 23:37:52] NOTICE: ready to handle connections
  132. [26-Nov-2015 23:47:43] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)
  133. [26-Nov-2015 23:47:43] ERROR: FPM initialization failed
  134. [26-Nov-2015 23:48:11] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)
  135. [26-Nov-2015 23:48:11] ERROR: FPM initialization failed
  136. [26-Nov-2015 23:49:33] ERROR: unable to bind listening socket for address '127.0.0.2:8999': Address already in use (98)
  137. [26-Nov-2015 23:49:33] ERROR: FPM initialization failed
  138. [26-Nov-2015 23:56:18] ERROR: unable to bind listening socket for address '127.0.0.2:8999': Address already in use (98)
  139. [26-Nov-2015 23:56:18] ERROR: FPM initialization failed
  140. [27-Nov-2015 00:02:41] NOTICE: fpm is running, pid 6535
  141. [27-Nov-2015 00:02:41] NOTICE: ready to handle connections
  142. [27-Nov-2015 00:04:41] NOTICE: Terminating ...
  143. [27-Nov-2015 00:04:41] NOTICE: exiting, bye-bye!
  144. [27-Nov-2015 00:04:41] WARNING: [pool www] child 5378 exited on signal 15 (SIGTERM) after 1890.219741 seconds from start
  145. [27-Nov-2015 00:04:41] NOTICE: [pool www] child 6842 started
  146. [27-Nov-2015 00:04:41] WARNING: [pool www] child 5379 exited on signal 15 (SIGTERM) after 1890.219720 seconds from start
  147. [27-Nov-2015 00:04:41] NOTICE: [pool www] child 6843 started
  148. [27-Nov-2015 00:04:41] NOTICE: Terminating ...
  149. [27-Nov-2015 00:04:41] NOTICE: exiting, bye-bye!
  150. [27-Nov-2015 00:04:41] ERROR: Unable to remove the PID file (/opt/php-7.0/var/run/php7-fpm.pid).: No such file or directory (2)
  151. [27-Nov-2015 00:04:41] WARNING: [pool www] child 5804 exited on signal 15 (SIGTERM) after 1608.672855 seconds from start
  152. [27-Nov-2015 00:04:41] NOTICE: [pool www] child 6845 started
  153. [27-Nov-2015 00:04:41] WARNING: [pool www] child 5805 exited on signal 15 (SIGTERM) after 1608.673323 seconds from start
  154. [27-Nov-2015 00:04:41] NOTICE: [pool www] child 6846 started
  155. [27-Nov-2015 00:04:41] NOTICE: Terminating ...
  156. [27-Nov-2015 00:04:41] NOTICE: exiting, bye-bye!
  157. [27-Nov-2015 00:04:41] ERROR: Unable to remove the PID file (/opt/php-7.0/var/run/php7-fpm.pid).: No such file or directory (2)
  158.  
  159. apache2 error log:
  160. ...
  161. [Fri Nov 27 09:53:23.756849 2015] [mpm_event:notice] [pid 5702:tid 139649715455872] AH00489: Apache/2.4.17 (Ubuntu) configured -- resuming normal operations
  162. [Fri Nov 27 09:53:23.757006 2015] [core:notice] [pid 5702:tid 139649715455872] AH00094: Command line: '/usr/sbin/apache2'
  163. [Fri Nov 27 09:53:56.824246 2015] [mpm_event:notice] [pid 5702:tid 139649715455872] AH00491: caught SIGTERM, shutting down
  164. [Fri Nov 27 09:53:57.907257 2015] [mpm_event:notice] [pid 5826:tid 140694475126656] AH00489: Apache/2.4.17 (Ubuntu) configured -- resuming normal operations
  165. [Fri Nov 27 09:53:57.907405 2015] [core:notice] [pid 5826:tid 140694475126656] AH00094: Command line: '/usr/sbin/apache2'
  166. [Fri Nov 27 10:00:33.927841 2015] [mpm_event:notice] [pid 5826:tid 140694475126656] AH00491: caught SIGTERM, shutting down
  167. [Fri Nov 27 10:00:35.000889 2015] [mpm_event:notice] [pid 6040:tid 140592894453632] AH00489: Apache/2.4.17 (Ubuntu) configured -- resuming normal operations
  168. [Fri Nov 27 10:00:35.001205 2015] [core:notice] [pid 6040:tid 140592894453632] AH00094: Command line: '/usr/sbin/apache2'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement