Хочу сделать web интерфейс supervisor по адресу domain.ru/supervisor:
#user 'domain' virtual host 'domain.ru' configuration file
<VirtualHost 91.240.86.222:80>
ServerName domain.ru
AddDefaultCharset off
AssignUserID domain domain
DirectoryIndex index.html index.php
DocumentRoot /var/www/domain/data/www/domain.ru
ServerAdmin webmaster@domain.ru
ServerAlias www.domain.ru
CustomLog /var/www/httpd-logs/domain.ru.access.log combined
ErrorLog /var/www/httpd-logs/domain.ru.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@domain.ru"
php_admin_value upload_tmp_dir "/var/www/domain/data/mod-tmp"
php_admin_value session.save_path "/var/www/domain/data/mod-tmp"
php_admin_value open_basedir "/var/www/domain/data:."
location /supervisor/ {
rewrite ^/supervisor(.+)$ $1 break;
proxy_pass http://localhost:9001;
proxy_redirect http://domain.ru http://domain.ru/supervisor;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
</VirtualHost>
<VirtualHost 91.240.86.222:443>
ServerName domain.ru
AddDefaultCharset off
AssignUserID domain domain
DirectoryIndex index.html index.php
DocumentRoot /var/www/domain/data/www/domain.ru
ServerAdmin webmaster@domain.ru
ServerAlias www.domain.ru
CustomLog /var/www/httpd-logs/domain.ru.access.log combined
ErrorLog /var/www/httpd-logs/domain.ru.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@domain.ru"
php_admin_value upload_tmp_dir "/var/www/domain/data/mod-tmp"
php_admin_value session.save_path "/var/www/domain/data/mod-tmp"
#php_admin_value open_basedir "/var/www/domain/data:."
SSLCertificateChainFile "/var/www/httpd-cert/domain/domain.ru.ca"
SSLCertificateFile "/var/www/httpd-cert/domain/domain.ru.crt"
SSLCertificateKeyFile "/var/www/httpd-cert/domain/domain.ru.key"
SSLCipherSuite HIGH:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!EXP:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2
SSLEngine on
SSLHonorCipherOrder on
SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
</VirtualHost>
<Directory /var/www/domain/data/www/domain.ru>
Options +Includes -ExecCGI
php_admin_flag engine on
</Directory>
[root@domain~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Если убрать:
location /supervisor/ {
rewrite ^/supervisor(.+)$ $1 break;
proxy_pass http://localhost:9001;
proxy_redirect http://domain.ru http://domain.ru/supervisor;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Все ок, что я делаю не так?