Прошу помощи:
1. есть один белый IP, и два домена (site.ru и mail.site.ru), который по DNS ссылаются на один локальный сервер 192.168.1.117, где установлен OpenServer и реализован проект site.ru
2. Почтовая служба https://mail.site.ru/owa (MS Exchange) расположена на другом локальном сервере 192.168.1.116.
3. В OpenServer создана вторая папка mail.site.ru где расположены только файлы (во вложении)
Apache_2.4-PHP_8.0-8.1+Nginx_1.23_servera.conf
Apache_2.4-PHP_8.0-8.1+Nginx_1.23_servern.conf
Apache_2.4-PHP_8.0-8.1+Nginx_1.23_vhosta.conf
Apache_2.4-PHP_8.0-8.1+Nginx_1.23_vhostn.conf
server {
listen %ip%:%httpport%;
listen %ip%:%httpsport% ssl;
server_name %host% %aliases%;
root '%hostdir%';
#limit_conn addr 64;
autoindex off;
index index.php index.html index.htm;
ssl_certificate '%sprogdir%/userdata/config/cert_files/site.ru/site.ru-chain.pem';
ssl_certificate_key '%sprogdir%/userdata/config/cert_files/site.ru/site.ru-key.pem';
#ssl_trusted_certificate '';
# Force HTTPS
#if ($scheme ~* ^(?!https).*$) {
# return 301 https://$host$request_uri;
#}
# Force www.site.com => site.com
#if ($host ~* ^www\.(.+)$) {
# return 301 $scheme://$1$request_uri;
#}
# Disable MIME sniffing
add_header X-Content-Type-Options 'nosniff' always;
# HSTS
#add_header Strict-Transport-Security 'max-age=2592000' always;
# Disable access to hidden files/folders
location ~* /\.(?!well-known/) {
deny all;
log_not_found off;
access_log off;
}
# Disable access to backup/config/command/log files
location ~* (?:\.(?:bak|co?nf(ig)?|in[ci]|log|sh|sql|tar|t?gz)|~)$ {
deny all;
}
location ~* ^.+\.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv|svgz?|ttf|ttc|otf|eot|woff2?)$ {
expires 1d;
access_log off;
}
location / {
# Force index.php routing (if not found)
#try_files $uri $uri/ /index.php?$query_string;
# Force index.php routing (all requests)
#rewrite ^/(.*)$ /index.php?/$1 last;
#limit_conn addr 16;
#limit_req zone=flood burst=32 nodelay;
#add_header X-Frame-Options 'SAMEORIGIN' always;
#add_header Referrer-Policy 'no-referrer-when-downgrade' always;
# CSP syntax: <host-source> <scheme-source>(http: https: data: mediastream: blob: filesystem:) 'self' 'unsafe-inline' 'unsafe-eval' 'none'
#add_header Content-Security-Policy-Report-Only "default-src 'self'; report-uri https://site.com/csp/" always;
#add_header Content-Security-Policy "default-src 'self'; connect-src 'self'; font-src 'self'; frame-src 'self'; img-src 'self'; manifest-src 'self'; media-src 'self'; object-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; base-uri 'none'; form-action 'self'; frame-ancestors 'self'; upgrade-insecure-requests" always;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Country-Code $geoip2_data_country_code;
#proxy_set_header X-Country-Name $geoip2_data_country_name;
# proxy_pass http://%ips%:%httpbackport%/;
proxy_pass https://192.168.1.116/;
}
location ^~ /apacheicons/ {
alias %sprogdir%/modules/http/%httpdriver%/icons/;
}
location ^~ /apacheerror/ {
alias %sprogdir%/modules/http/%httpdriver%/error/;
}
# Service configuration (do not edit!)
# ----------------------------
location /openserver/ {
root '%sprogdir%/modules/system/html';
autoindex off;
index index.php index.html index.htm;
%allow%allow all;
allow 127.0.0.0/8;
allow ::1/128;
allow %ips%;
deny all;
location ~* ^/openserver/.+\.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|webm|svgz?|ttf|ttc|otf|eot|woff2?)$ {
expires 1d;
access_log off;
}
location /openserver/server-status {
stub_status on;
}
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://%ips%:%httpbackport%/openserver/;
}
# End service configuration
# ----------------------------
}
4. При заходе на https://mail.site.ru/owa показывается страница авторизации, однако после входа возникает ошибка, смысл которой в том, что необходимый файл JS недоступен (ошибка 404 при открытии скрипта https://mail.site.ru/owa/prem/15.2.595. ... .narrow.js но всё работает внутри локального сервера при заходе на https://192.168.1.116/owa/prem/15.2.595 ... .narrow.jsТо есть обратный Proxy по какой-то причине не пробрасывает JS-скрипты, вероятно конфиги п.3 настроены неправильно.
Помогите пожалуйста разобраться
