An AJAX HTTP error occurred. HTTP Result Code: 502. Как исправить?

Главные вкладки

Аватар пользователя Татьяна-М Татьяна-М 25 июня 2015 в 13:36

Добрый день!

После смены хостинговой компании при работе в админке Друпала-7 начала вылезать такая ошибка:

An AJAX HTTP error occurred.
HTTP Result Code: 502
Debugging information follows.
Path: /system/ajax
StatusText: Bad Gateway
ResponseText:

502 Bad Gateway

502 Bad Gateway

nginx

В настоящее время ошибка "отловлена" при добавлении на сайт изображений или звуковых файлов (не добавляются), при попытке изменить формат поля при работе с типами материалов (невозможно изменить).

Хостер поставлен в известность, долго пытался что-то настроить и изменить, но в результате сказал, что ничего сделать не может.

Помогите, пожалуйста, разобраться в проблеме и решить ее... Заранее спасибо!

Комментарии

Аватар пользователя minihost minihost 21 июля 2015 в 15:46

Побороть nginx лично мне пока не удалось на Drupal 7, а очень хочется.
Избавиться от ошибок AJAX можно лишь убрав проксю nginx.

Я не буду рекомендовать хостинг слева, долго на нем сидел, в итоге ушел.

Аватар пользователя postgres postgres 17 августа 2015 в 18:23

настройка nginx + apache дело хоть и реализуемое, но муторное.
Одной из проблем например является добавление в заголовки запросов ip адреса форварда, о чем потом надо и друпал уведомить в секции:

/**
* Reverse Proxy Configuration:
*
* Reverse proxy servers are often used to enhance the performance
* of heavily visited sites and may also provide other site caching,
* security, or encryption benefits. In an environment where Drupal
* is behind a reverse proxy, the real IP address of the client should
* be determined such that the correct client IP address is available
* to Drupal's logging, statistics, and access management systems. In
* the most simple scenario, the proxy server will add an
* X-Forwarded-For header to the request that contains the client IP
* address. However, HTTP headers are vulnerable to spoofing, where a
* malicious client could bypass restrictions by setting the
* X-Forwarded-For header directly. Therefore, Drupal's proxy
* configuration requires the IP addresses of all remote proxies to be
* specified in $conf['reverse_proxy_addresses'] to work correctly.
*
* Enable this setting to get Drupal to determine the client IP from
* the X-Forwarded-For header (or $conf['reverse_proxy_header'] if set).
* If you are unsure about this setting, do not have a reverse proxy,
* or Drupal operates in a shared hosting environment, this setting
* should remain commented out.
*
* In order for this setting to be used you must specify every possible
* reverse proxy IP address in $conf['reverse_proxy_addresses'].
* If a complete list of reverse proxies is not available in your
* environment (for example, if you use a CDN) you may set the
* $_SERVER['REMOTE_ADDR'] variable directly in settings.php.
* Be aware, however, that it is likely that this would allow IP
* address spoofing unless more advanced precautions are taken.
*/
# $conf['reverse_proxy'] = TRUE;

/**
* Specify every reverse proxy IP address in your environment.
* This setting is required if $conf['reverse_proxy'] is TRUE.
*/
#$conf['reverse_proxy_addresses'] = array('127.0.0.1');

/**
* Set this value if your proxy server sends the client IP in a header
* other than X-Forwarded-For.
*/
# $conf['reverse_proxy_header'] = 'HTTP_X_CLUSTER_CLIENT_IP';

Ну и потом тоже смотреть логи и определять, почему nginx чего то недокладывает...
А посему совет убрать nginx вполне оправдан, хостер что сильно против чистого апача?