[Auto-Sync] Atualização das configurações em srvproxy001.itguys.com.br - 2025-09-22 18:24:22
This commit is contained in:
parent
10859161f2
commit
113f640f62
|
|
@ -1,8 +1,8 @@
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# ARQUIVO DE CONFIGURAÇÃO NGINX PARA NEXTCLOUD
|
# ARQUIVO DE CONFIGURAÇÃO NGINX PARA NEXTCLOUD E OFFICE ONLINE
|
||||||
# DOMÍNIO: cloud.grupopralog.com.br
|
# DOMÍNIO: cloud.grupopralog.com.br
|
||||||
# AUTOR: Gemini AI (Especialista NGINX)
|
# AUTOR: Gemini AI (Especialista NGINX)
|
||||||
# VERSÃO: 4.0
|
# VERSÃO: 4.1 (com proxy para Office Online)
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
@ -12,6 +12,11 @@ upstream nextcloud_backend {
|
||||||
server 172.16.253.12;
|
server 172.16.253.12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# NOVO UPSTREAM PARA O OFFICE ONLINE SERVER
|
||||||
|
upstream officeonline_backend {
|
||||||
|
server srvoffice001.itguys.com.br:443;
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# B. BLOCO HTTP: Redirecionar para HTTPS
|
# B. BLOCO HTTP: Redirecionar para HTTPS
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
@ -20,12 +25,10 @@ server {
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name cloud.grupopralog.com.br;
|
server_name cloud.grupopralog.com.br;
|
||||||
|
|
||||||
# Desafio para renovação de certificado Let's Encrypt
|
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
root /var/www/html;
|
root /var/www/html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Redirecionamento permanente para a versão HTTPS do site
|
|
||||||
location / {
|
location / {
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +51,6 @@ server {
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
||||||
add_header X-Content-Type-Options nosniff always;
|
add_header X-Content-Type-Options nosniff always;
|
||||||
#add_header X-Frame-Options "SAMEORIGIN" always;
|
|
||||||
add_header X-Permitted-Cross-Domain-Policies none always;
|
add_header X-Permitted-Cross-Domain-Policies none always;
|
||||||
add_header X-Robots-Tag "noindex, nofollow" always;
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
||||||
add_header X-XSS-Protection "1; mode=block" always;
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
|
|
@ -70,22 +72,34 @@ server {
|
||||||
location = /.well-known/carddav { return 301 $scheme://$host/remote.php/dav; }
|
location = /.well-known/carddav { return 301 $scheme://$host/remote.php/dav; }
|
||||||
location = /.well-known/caldav { return 301 $scheme://$host/remote.php/dav; }
|
location = /.well-known/caldav { return 301 $scheme://$host/remote.php/dav; }
|
||||||
|
|
||||||
|
# ==========================================================================
|
||||||
|
# NOVO BLOCO: H.1.5. Proxy Reverso para o Office Online Server
|
||||||
|
# Este bloco intercepta as requisições do OOS e as envia para o servidor correto.
|
||||||
|
# DEVE VIR ANTES DE 'location /'
|
||||||
|
# ==========================================================================
|
||||||
|
location ~ ^/(m|x|we|wv|op/view) {
|
||||||
|
proxy_pass https://officeonline_backend;
|
||||||
|
|
||||||
|
# Cabeçalhos para o OOS funcionar corretamente atrás de um proxy
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
}
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# H.2. Rota Principal da Aplicação Nextcloud
|
# H.2. Rota Principal da Aplicação Nextcloud
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
location / {
|
location / {
|
||||||
# Passa a requisição para o backend
|
|
||||||
proxy_pass http://nextcloud_backend;
|
proxy_pass http://nextcloud_backend;
|
||||||
|
# ... (todos os outros parâmetros de proxy que você já tinha) ...
|
||||||
# F. Cabeçalhos de Proxy (iguais aos que você já tinha)
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Forwarded-Port $server_port;
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
|
||||||
# Parâmetros adicionais de proxy
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_connect_timeout 60s;
|
proxy_connect_timeout 60s;
|
||||||
proxy_read_timeout 3600s;
|
proxy_read_timeout 3600s;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue