Консоль браузера ругается на /job.php

Статус
В этой теме нельзя размещать новые ответы.

rozhur

Проверенные
Сообщения
142
Решения
3
Реакции
195
Баллы
755
Собственно, вот ошибка в консоли браузера:

Код:
jquery-3.3.1.min.js?_v=22a88df1:2 Mixed Content: The page at 'https://site/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://site/job.php'. This request has been blocked; the content must be served over HTTPS.

Установил форум только что, чистый, поэтому подозрения могут быть только на сторону хоста.


Форум стоит на VPS (ovh).
Версия xenforo - 2.1.5а.
Связка apache2+nginx.
SSL от let's encpypt


2.png
Код:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 /
ErrorDocument 404 /
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

IfModule mod_rewrite.c
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to workaround HTTP Basic auth issues when using PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
/IfModule
Код:
server
{
    server_name site;
    access_log /var/log/nginx/access.log;
        location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_connect_timeout 120;
        proxy_send_timeout 120;
        proxy_read_timeout 180;
    }
    location /socket.io/ {
        proxy_pass http://127.0.0.1:2999/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
}


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/site/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/site/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}server
{
    if ($host = site) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    server_name site;
    listen 80;
    return 404; # managed by Certbot


}
Код:
<VirtualHost 127.0.0.1:8080>
    ServerName site
    DocumentRoot /var/www/admin/site
    <Directory /var/www/admin/site>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    <IfModule remoteip_module>
    RemoteIPHeader X-Forwarded-For
    RemoteIPTrustedProxy 127.0.0.1
    </IfModule>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

В чем может быть проблема? как ее решить?
 
Последнее редактирование:
Разве не этот параметр это делает?
Код:
    if ($host = site) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
До переустановки форума этот редирект был прописан в .htaccess. с данной темой был ознакомлен
 
Последнее редактирование:
А в /admin.php?tools/phpinfo какое значение стоит напротив $_SERVER['HTTPS']?
Больше похоже на то, что форум сам определить не может, по HTTPS ли прилетел сейчас запрос или нет.
 
Проблему успешно решил на стороне сервера методом гугления. Спасибо за ответы.
- Добавить в nginx proxy_set_header X-Forwarded-Proto $scheme;
- и в apache2
Код:
    <IfModule setenvif_module>
        SetEnvIf X-Forwarded-Proto https HTTPS=on
    </IfModule>
 
Статус
В этой теме нельзя размещать новые ответы.
Современный облачный хостинг провайдер | Aéza
Назад
Сверху Снизу