suphp

Centos установка FreePBX в VirtualHost (suphp)

Убил день на поиски решения ISPconfig+Asterisk+FreePBX решил записать решение. Скачиваем и устанвливаем
wget ftp://fr2.rpmfind.net/linux/dag/redhat/el5/en/i386/dag/RPMS/mod_suphp-0.7.1-1.el5.rf.i386.rpm
rpm -i mod_suphp-0.7.1-1.el5.rf.i386.rpm
mkdir /var/lib/php/session_freebpx
chown asterisk:asterisk /var/lib/php/session_freebpx
Содержимое файла /etc/httpd/conf.d/suphp.conf
LoadModule suphp_module modules/mod_suphp.so
Содержимое /etc/suphp.conf
[global]
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0022
min_uid=500
min_gid=500
 
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
 
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
 
;Send minor error messages to browser
errors_to_browser=false
;handle_userdir=true
 
[handlers]
;Handler for php-scripts
;x-httpd-php=php:/usr/bin/php
x-httpd-php=php\:/usr/bin/php-cgi
 
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
Содержимое файла /etc/httpd/conf.d/freepbx.conf
Listen 8100
NameVirtualHost *:8100
<VirtualHost *:8100>
ServerAdmin moc.niamodym@ti
ServerName freepbx.mydomain.com
DirectoryIndex index.php
DocumentRoot /var/www/freepbx
suPHP_Engine on
suPHP_UserGroup asterisk asterisk
suPHP_ConfigPath /etc
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-suphp x-httpd-php
php_value session.save_path ‘/var/lib/php/session_freebpx’
<Directory /var/www/freepbx>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from All
</Directory>
ErrorLog /var/log/httpd/error_log
# ErrorLog /var/log/apache2/freepbx-error.log
LogLevel warn
# CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Перегружаем httpd
/etc/init.d/httpd restart
VN:D [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:D [1.9.22_1171]
Rating: +1 (from 1 vote)

Login

Рубрики

Праздники

Армейские праздники

Счетчики

Яндекс.Метрика