Asterisk+FreePBX+ISPmanager+Debian

FreePBX, TrixBox, AsteriskGUI и др.
Всевозможные надстройки/интерфейсы к Asterisk в виде GUI.
[всё что прямо не относится к Asterisk писать сюда]

Модераторы: Admins, Модераторы

Ответить
zypper
Сообщения: 4
Зарегистрирован: 14 сен 2017, 22:09

Asterisk+FreePBX+ISPmanager+Debian

Сообщение zypper » 14 сен 2017, 22:14

Здравствуйте. На VPS стоит Debian с ISPmanager. Установил по мануалу Asterisk и FreePBX. Но при обращении http://xxx.xxx.xxx.xxx/admin/config.php я вижу ошибку "HTTP ERROR 500". В этом же каталоге лежит phpinfo.php файл хотя он работает, а веб-морда FreePBX нет. В чем проблема? Куда смотреть?

Конфиг виртуалхоста:
[spoiler]<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName xxx.xxx.xxx.xxx.
ServerAlias www.xxx.xxx.xxx.xxx
DocumentRoot /var/www/html
ServerAdmin webmaster@xxx.xxx.xxx.xxx
DirectoryIndex index.html index.php
AddDefaultCharset off
AssignUserID www-root www-root
CustomLog /var/www/httpd-logs/xxx.xxx.xxx.xxx.access.log combined
ErrorLog /var/www/httpd-logs/xxx.xxx.xxx.xxx.error.log
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f webmaster@xxx.xxx.xxx.xxx"
php_admin_value upload_tmp_dir "/var/www/www-root/data/mod-tmp"
php_admin_value session.save_path "/var/www/www-root/data/mod-tmp"
php_admin_value open_basedir "/var/www/www-root/data:."
</VirtualHost>
<Directory /var/www/html>
Options +Includes -ExecCGI
php_admin_flag engine on
</Directory>[/spoiler]
Конфиг .htaccess:
[spoiler]# License for all code of this FreePBX module can be found in the license file inside the module directory
# Copyright 2013-2015 Schmooze Com Inc.
# Copyright 2016 Sangoma Technologies Corporation
#
# This is here to present a warning in the GUI if it's not parsed. If this isn't parsed,
# you need to manually add these blocks to however you're managing ACLs on your web server
SetEnv HTACCESS on

# Apache 2.2
<IfModule !mod_authz_core.c>
# Disallow all . files, such as .htaccess or .git
<FilesMatch "\..*$">
Deny from all
</FilesMatch>
# Allow index, config, and ajax.php, as well as all our image types.
<FilesMatch "(^$|index\.php|config\.php|ajax\.php|\.(map|gif|GIF|jpg|jpeg|png|css|js|swf|txt|ico|ttf|svg|eot|woff|woff2|wav|mp3|aac|ogg|webm|gz)$)">
Allow from all
</FilesMatch>
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
# Disallow all . files, such as .htaccess or .git
<FilesMatch "\..*$">
Require all denied
</FilesMatch>
# Allow index, config, and ajax.php, as well as all our image types.
<FilesMatch "(^$|index\.php|config\.php|ajax\.php|\.(map|gif|GIF|jpg|jpeg|png|css|js|swf|txt|ico|ttf|svg|eot|woff|woff2|wav|mp3|aac|ogg|webm|gz)$)">
Require all granted
</FilesMatch>
</IfModule>

<IfModule php5_module>
php_value max_input_vars 5000
</IfModule>

RewriteEngine on
#RewriteCond %{ENV:REDIRECT_STATUS} 200
#RewriteRule ^ - [L]
#RewriteRule ^config.php - [L,QSA]
#RewriteRule ^ajax.php - [L,QSA]
RewriteRule \.git/ - [F]
RewriteRule libraries - [F]
RewriteRule helpers - [F]
RewriteRule i18n - [F]
RewriteRule node - [F]
RewriteRule views/.+php$ - [F][/spoiler]

Манул по которому ставил: https://wiki.freepbx.org/display/FOP/In ... Debian+8.8
Команду a2enmod rewrite я не давал. Все равно ISPmanager PHP выдает посайтово.
_________
В файлов веб-морды FreePBX пользователь и группа asterisk

virus_net
Сообщения: 442
Зарегистрирован: 05 окт 2014, 06:10
Откуда: Москва
Контактная информация:

Сообщение virus_net » 15 сен 2017, 05:28

боюсь показаться банальным или старомодным, но смотреть в логи, для начала в логи апача
так же возможен косяк из-за содержимого хтаксес
bitname.ru - Домены .bit (namecoin) .emc .coin .lib .bazar (emercoin)
- whois сервис: whois.bitname.ru или whois.bitname.bit
- dns сервис: dns1.bitname.ru dns2.bitname.ru
- статистика по доменам
ENUMER - звони бесплатно и напрямую.

zypper
Сообщения: 4
Зарегистрирован: 14 сен 2017, 22:09

Сообщение zypper » 15 сен 2017, 19:03

[url=http://asteriskforum.ru/viewtopic.php?p=85167#85167][img]http://asteriskforum.ru/images/quotebackarrow.gif[/img][/url] virus_net @ Пт Сен 15, 2017 05:28 писал(а):боюсь показаться банальным или старомодным, но смотреть в логи, для начала в логи апача
так же возможен косяк из-за содержимого хтаксес
Лог
[spoiler]
[Fri Sep 15 22:50:09.002350 2017] [:error] [pid 3927] [client 91.217.60.223:45322] PHP Warning: include_once(): open_basedir restriction in effect. File(/etc/freepbx.conf) is not within the allowed path(s): (/var/www/www-root/data:.) in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:50:09.002410 2017] [:error] [pid 3927] [client 91.217.60.223:45322] PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Operation not permitted in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:50:09.002423 2017] [:error] [pid 3927] [client 91.217.60.223:45322] PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:50:09.002448 2017] [:error] [pid 3927] [client 91.217.60.223:45322] PHP Fatal error: Class 'FreePBX' not found in /var/www/html/admin/config.php on line 110
[Fri Sep 15 22:50:12.206089 2017] [:error] [pid 3928] [client 91.217.60.223:45324] PHP Warning: include_once(): open_basedir restriction in effect. File(/etc/freepbx.conf) is not within the allowed path(s): (/var/www/www-root/data:.) in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:50:12.206153 2017] [:error] [pid 3928] [client 91.217.60.223:45324] PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Operation not permitted in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:50:12.206165 2017] [:error] [pid 3928] [client 91.217.60.223:45324] PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:50:12.206184 2017] [:error] [pid 3928] [client 91.217.60.223:45324] PHP Fatal error: Class 'FreePBX' not found in /var/www/html/admin/config.php on line 110
[Fri Sep 15 22:51:55.337580 2017] [authz_core:error] [pid 3954] [client 91.217.60.223:45392] AH01630: client denied by server configuration: /var/www/html/admin/index.html
[Fri Sep 15 22:51:55.404033 2017] [:error] [pid 3954] [client 91.217.60.223:45392] PHP Warning: include_once(): open_basedir restriction in effect. File(/etc/freepbx.conf) is not within the allowed path(s): (/var/www/www-root/data:.) in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:51:55.404077 2017] [:error] [pid 3954] [client 91.217.60.223:45392] PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Operation not permitted in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:51:55.404088 2017] [:error] [pid 3954] [client 91.217.60.223:45392] PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/admin/config.php on line 100
[Fri Sep 15 22:51:55.404105 2017] [:error] [pid 3954] [client 91.217.60.223:45392] PHP Fatal error: Class 'FreePBX' not found in /var/www/html/admin/config.php on line 110
[Fri Sep 15 22:53:08.274304 2017] [:error] [pid 4038] [client 183.11.37.52:44448] script '/var/www/html/proxy.php' not found or unable to stat, referer: RefererString
[Fri Sep 15 22:55:55.823112 2017] [:error] [pid 4101] [client 109.234.34.189:53946] script '/var/www/html/getip2.php' not found or unable to stat, referer: http://www.google.com
[Fri Sep 15 23:33:27.336356 2017] [:error] [pid 8257] [client xxx.xxx.xxx.xxx:56993] script '/var/www/html/proxy.php' not found or unable to stat, referer: RefererString
[Fri Sep 15 23:35:50.050309 2017] [:error] [pid 8320] [client 46.188.7.123:49278] script '/var/www/html/proxy.php' not found or unable to stat, referer: RefererString
[Fri Sep 15 23:46:03.455454 2017] [:error] [pid 8713] [client 183.11.37.52:42397] script '/var/www/html/proxy.php' not found or unable to stat, referer: RefererString
[Sat Sep 16 00:28:25.492226 2017] [authz_core:error] [pid 13733] [client 74.142.230.42:55734] AH01630: client denied by server configuration: /var/www/html/admin/index.html
[Sat Sep 16 00:33:03.467669 2017] [:error] [pid 14069] [client xxx.xxx.xxx.xxx:19532] script '/var/www/html/proxy.php' not found or unable to stat, referer: RefererString
[Sat Sep 16 00:35:16.971447 2017] [:error] [pid 14172] [client 46.188.7.123:56901] script '/var/www/html/proxy.php' not found or unable to stat, referer: RefererString
[Sat Sep 16 00:46:24.877386 2017] [:error] [pid 14773] [client 183.11.37.52:44437] script '/var/www/html/proxy.php' not found or unable to stat, referer: RefererString
[Sat Sep 16 00:58:55.576284 2017] [authz_core:error] [pid 17098] [client 91.217.60.223:51132] AH01630: client denied by server configuration: /var/www/html/admin/index.html
[Sat Sep 16 00:58:55.638081 2017] [:error] [pid 17098] [client 91.217.60.223:51132] PHP Warning: include_once(): open_basedir restriction in effect. File(/etc/freepbx.conf) is not within the allowed path(s): (/var/www/www-root/data:.) in /var/www/html/admin/config.php on line 100
[Sat Sep 16 00:58:55.638120 2017] [:error] [pid 17098] [client 91.217.60.223:51132] PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Operation not permitted in /var/www/html/admin/config.php on line 100
[Sat Sep 16 00:58:55.638132 2017] [:error] [pid 17098] [client 91.217.60.223:51132] PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/admin/config.php on line 100
[Sat Sep 16 00:58:55.638152 2017] [:error] [pid 17098] [client 91.217.60.223:51132] PHP Fatal error: Class 'FreePBX' not found in /var/www/html/admin/config.php on line 110
[Sat Sep 16 00:58:58.596845 2017] [:error] [pid 17099] [client 91.217.60.223:51134] PHP Warning: include_once(): open_basedir restriction in effect. File(/etc/freepbx.conf) is not within the allowed path(s): (/var/www/www-root/data:.) in /var/www/html/admin/config.php on line 100
[Sat Sep 16 00:58:58.596899 2017] [:error] [pid 17099] [client 91.217.60.223:51134] PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Operation not permitted in /var/www/html/admin/config.php on line 100
[Sat Sep 16 00:58:58.596909 2017] [:error] [pid 17099] [client 91.217.60.223:51134] PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/admin/config.php on line 100
[Sat Sep 16 00:58:58.596928 2017] [:error] [pid 17099] [client 91.217.60.223:51134] PHP Fatal error: Class 'FreePBX' not found in /var/www/html/admin/config.php on line 110
[Sat Sep 16 01:02:20.513190 2017] [authz_core:error] [pid 17376] [client 91.217.60.223:51314] AH01630: client denied by server configuration: /var/www/html/admin/index.html
[Sat Sep 16 01:02:20.575367 2017] [:error] [pid 17376] [client 91.217.60.223:51314] PHP Warning: include_once(): open_basedir restriction in effect. File(/etc/freepbx.conf) is not within the allowed path(s): (/var/www/www-root/data:.) in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:20.575404 2017] [:error] [pid 17376] [client 91.217.60.223:51314] PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Operation not permitted in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:20.575414 2017] [:error] [pid 17376] [client 91.217.60.223:51314] PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:20.575431 2017] [:error] [pid 17376] [client 91.217.60.223:51314] PHP Fatal error: Class 'FreePBX' not found in /var/www/html/admin/config.php on line 110
[Sat Sep 16 01:02:22.591834 2017] [:error] [pid 17377] [client 91.217.60.223:51312] PHP Warning: include_once(): open_basedir restriction in effect. File(/etc/freepbx.conf) is not within the allowed path(s): (/var/www/www-root/data:.) in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:22.591908 2017] [:error] [pid 17377] [client 91.217.60.223:51312] PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Operation not permitted in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:22.591919 2017] [:error] [pid 17377] [client 91.217.60.223:51312] PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:22.591936 2017] [:error] [pid 17377] [client 91.217.60.223:51312] PHP Fatal error: Class 'FreePBX' not found in /var/www/html/admin/config.php on line 110
[Sat Sep 16 01:02:24.025708 2017] [:error] [pid 17378] [client 91.217.60.223:51316] PHP Warning: include_once(): open_basedir restriction in effect. File(/etc/freepbx.conf) is not within the allowed path(s): (/var/www/www-root/data:.) in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:24.025759 2017] [:error] [pid 17378] [client 91.217.60.223:51316] PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Operation not permitted in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:24.025769 2017] [:error] [pid 17378] [client 91.217.60.223:51316] PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/admin/config.php on line 100
[Sat Sep 16 01:02:24.025787 2017] [:error] [pid 17378] [client 91.217.60.223:51316] PHP Fatal error: Class 'FreePBX' not found in /var/www/html/admin/config.php on line 110
[/spoiler]

htaccess дефолтный

awsswa
Сообщения: 1723
Зарегистрирован: 28 апр 2012, 10:19
Откуда: Russia, Пермь

Сообщение awsswa » 16 сен 2017, 04:38

apache под кем запущен ? asterisk
сам asterisk тоже запускается от пользователя asterisk
права на каталоги тоже на пользователя asterisk

но все это стандартно

либо по кривому пути - пользователя asterisk добавлять в группы www-data
либо вообще все из под рута пускать

в логах четко расписано - не хватает права - operation no pernited
платный суппорт по мере возможностей

zypper
Сообщения: 4
Зарегистрирован: 14 сен 2017, 22:09

Сообщение zypper » 16 сен 2017, 13:55

[url=http://asteriskforum.ru/viewtopic.php?p=85172#85172][img]http://asteriskforum.ru/images/quotebackarrow.gif[/img][/url] awsswa @ Сб Сен 16, 2017 04:38 писал(а):apache под кем запущен ? asterisk
сам asterisk тоже запускается от пользователя asterisk
права на каталоги тоже на пользователя asterisk

но все это стандартно

либо по кривому пути - пользователя asterisk добавлять в группы www-data
либо вообще все из под рута пускать

в логах четко расписано - не хватает права - operation no pernited
Пользователя asterisk добавил в группу www-data. Сам Апач запускается от пользователя asterisk, как я понимаю:

[spoiler]root@debian:~# ps auxwwww | grep apache
asterisk 4074 0.0 0.5 357120 11404 ? S 10:09 0:00 /usr/sbin/apache2 -k start
root 17334 0.0 1.5 357088 31384 ? Ss 01:02 0:02 /usr/sbin/apache2 -k start
asterisk 33804 0.0 0.5 357120 11404 ? S 14:42 0:00 /usr/sbin/apache2 -k start
asterisk 37443 0.0 0.5 357120 10492 ? S 15:18 0:00 /usr/sbin/apache2 -k start
asterisk 37444 0.0 0.5 357120 10492 ? S 15:18 0:00 /usr/sbin/apache2 -k start
root 37633 0.0 0.1 12732 2096 pts/0 S+ 15:23 0:00 grep apache
asterisk 53852 0.0 0.5 357120 11404 ? S 07:35 0:00 /usr/sbin/apache2 -k start
asterisk 53853 0.0 0.5 357120 11404 ? S 07:35 0:00 /usr/sbin/apache2 -k start
asterisk 53854 0.0 0.5 357120 11404 ? S 07:35 0:00 /usr/sbin/apache2 -k start
asterisk 53855 0.0 0.5 357120 11404 ? S 07:35 0:00 /usr/sbin/apache2 -k start
asterisk 53856 0.0 0.5 357120 11404 ? S 07:35 0:00 /usr/sbin/apache2 -k start
asterisk 53951 0.0 0.5 357120 11404 ? S 07:35 0:00 /usr/sbin/apache2 -k start
[/spoiler]

Added after 45 seconds:

Тут еще вот такое есть:

Код: Выделить всё

root@debian&#58;~# amportal Chown

Please wait...
PHP Fatal error&#58;  Uncaught exception 'PDOException' with message 'SQLSTATE&#91;HY000&#93; &#91;2003&#93; Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' &#40;4&#41;' in /var/www/html/admin/libraries/BMO/Database.class.php&#58;149
Stack trace&#58;
#0 /var/www/html/admin/libraries/BMO/Database.class.php&#40;149&#41;&#58; PDO->__construct&#40;'mysql&#58;host=94.8...', 'freepbxuser', '6242c4f0361ca41...', Array&#41;
#1 /var/www/html/admin/libraries/BMO/FreePBX.class.php&#40;69&#41;&#58; FreePBX\Database->__construct&#40;Object&#40;FreePBX&#41;&#41;
#2 /var/www/html/admin/bootstrap.php&#40;151&#41;&#58; FreePBX->__construct&#40;Array&#41;
#3 /etc/freepbx.conf&#40;9&#41;&#58; require_once&#40;'/var/www/html/a...'&#41;
#4 Command line code&#40;5&#41;&#58; include_once&#40;'/etc/freepbx.co...'&#41;
#5 &#123;main&#125;

Next exception 'Exception' with message 'SQLSTATE&#91;HY000&#93; &#91;2003&#93; Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' &#40;4&#41;&#58;&#58;SQLSTATE&#91;HY000&#93; &#91;2003&#93; Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' &#40;4&#41;' in /var/www/html/admin/libraries/utility.functions.php&#58;204
Stack trace&#58;
#0 /var/www/html/admin/libraries/BMO/Database.class.php&#40;154&#41;&#58; die_freepbx&#40;'SQLSTATE&#91;HY000&#93;...', Object&#40;PDOEx in /var/www/html/admin/libraries/utility.functions.php on line 204
/usr/sbin/amportal&#58; line 44&#58; Whoops\Exception\ErrorException&#58;&#58; command not found

/var/lib/asterisk/bin/freepbx_engine&#58; line 119&#58; Exception&#58;&#58; command not found
**** WARNING&#58; ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to  but the directory
does not exist. Attempting to create it with&#58;
  'mkdir -p '

mkdir&#58; missing operand
Try 'mkdir --help' for more information.
**** ERROR&#58; COULD NOT CREATE  ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.

awsswa
Сообщения: 1723
Зарегистрирован: 28 апр 2012, 10:19
Откуда: Russia, Пермь

Сообщение awsswa » 17 сен 2017, 13:37

Походу надо брать деньги в руки и в раздел БИЗНЕС
Где то вы промахиваетесь, сейчас появился не рабочий конфиг на mysql
платный суппорт по мере возможностей

zypper
Сообщения: 4
Зарегистрирован: 14 сен 2017, 22:09

Сообщение zypper » 17 сен 2017, 20:20

[url=http://asteriskforum.ru/viewtopic.php?p=85176#85176][img]http://asteriskforum.ru/images/quotebackarrow.gif[/img][/url] awsswa @ Вс Сен 17, 2017 13:37 писал(а):Походу надо брать деньги в руки и в раздел БИЗНЕС
Где то вы промахиваетесь, сейчас появился не рабочий конфиг на mysql
Вижу. Но мне кажется это не вызвало бы ошибку 500. :x

awsswa
Сообщения: 1723
Зарегистрирован: 28 апр 2012, 10:19
Откуда: Russia, Пермь

Сообщение awsswa » 18 сен 2017, 04:52

ошибка может быть любой
платный суппорт по мере возможностей

Ответить