Я установил свой сервер с помощью virtualmin, и я использую apache с php fpm. Когда я пытаюсь открыть свой веб-сайт, у меня появляется следующая ошибка:
Ошибка прокси
Прокси-сервер получил недопустимый ответ от вышестоящего сервера. Прокси-сервер не может обработать запрос GET /index.php.
Причина: ошибка поиска DNS для:
После "for:"он пуст
Вот мой файл конфигурации apache2 для этого сайта:
<VirtualHost xx.xx.xx.xx:80>
SuexecUserGroup "#1005" "#1005"
ServerName test.fr
ServerAlias www.test.fr
ServerAlias mail.test.fr
ServerAlias webmail.test.fr
ServerAlias admin.test.fr
DocumentRoot /home/test/public_html
ErrorLog /var/log/virtualmin/test.fr_error_log
CustomLog /var/log/virtualmin/test.fr_access_log combined
ScriptAlias /cgi-bin/ /home/test/cgi-bin/
ScriptAlias /awstats/ /home/test/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/test/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
</Directory>
<Directory /home/test/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.test.fr
RewriteRule ^(.*) https://test.fr:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.test.fr
RewriteRule ^(.*) https://test.fr:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
<Files awstats.pl>
AuthName "test.fr statistics"
AuthType Basic
AuthUserFile /home/test/.awstats-htpasswd
require valid-user
</Files>
<FilesMatch \.php$>
#SetHandler proxy:fcgi://localhost:8000
SetHandler proxy:fcgi:///var/run/154262472926263.sock
</FilesMatch>
</VirtualHost>
<VirtualHost xx.xx.xx.xx:443>
SuexecUserGroup "#1005" "#1005"
ServerName test.fr
ServerAlias www.test.fr
ServerAlias mail.test.fr
ServerAlias webmail.test.fr
ServerAlias admin.test.fr
DocumentRoot /home/test/public_html
ErrorLog /var/log/virtualmin/test.fr_error_log
CustomLog /var/log/virtualmin/test.fr_access_log combined
ScriptAlias /cgi-bin/ /home/test/cgi-bin/
ScriptAlias /awstats/ /home/test/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/test/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
</Directory>
<Directory /home/test/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.test.fr
RewriteRule ^(.*) https://test.fr:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.test.fr
RewriteRule ^(.*) https://test.fr:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
SSLEngine on
SSLCertificateFile /home/test/ssl.cert
SSLCertificateKeyFile /home/test/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
<Files awstats.pl>
AuthName "test.fr statistics"
AuthType Basic
AuthUserFile /home/test/.awstats-htpasswd
require valid-user
</Files>
<FilesMatch \.php$>
#SetHandler proxy:fcgi://localhost:8000
SetHandler proxy:fcgi:///var/run/154262472926263.sock
</FilesMatch>
</VirtualHost>
Спасибо
Формат вашего Директива SetHandler
для передачи в сокет домена UNIX неверна.
Она должна выглядеть так, как показано в документации :
SetHandler "proxy:unix:/var/run/154262472926263.sock|fcgi://localhost/"
Помните, что вы разместили ее в двух местах в ваша конфигурация.
Также имейте в виду, что у вас могут быть другие проблемы с конфигурацией, которые здесь не очевидны.