내 nginx 설정과 관련하여 약간의 문제가 있습니다. 하나의 중앙 서버를 프록시로 사용하여 네트워크에서 다중을 만들 계획입니다.NGNIX Nextcloud URL 리디렉션 실패에 대한 역방향 프록시
|---(/nextcloud/)--->Nextcloud-Server
-----> Central-Server--->|
|---(/git)---------->Git-Server
|
|---(/Redmine)---------->Redmine-Server
URL 리디렉션이 제대로 작동하지 않아 어떤 이유로 Nextcloud Server에서이 설정을 시작했습니다. 몇 가지 리디렉션 및 다시 쓰기 규칙을 사용하려고했지만 작동시키지 못했습니다.
위치에 액세스 할 때마다 항상 중앙 서버로 리디렉션됩니다. 따라서 domain.net/nextcloud/는 domain.net/login으로 리디렉션되지만 실제로 domain.net/nextcloud/login에 액세스해야합니다. 누구든지이 솔루션을 가지고 있습니까? 나의 현재 설정은 그냥 당신이 선택 할 자식 서버 다음 클라우드에 대한
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location/{
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
server {
listen 192.168.178.10:443 ssl;
server_name domain.net;
#root /usr/share/nginx/html;
ssl_certificate /mnt/docker/nginx/certs/fullchain.pem;
ssl_certificate_key /mnt/docker/nginx/certs/privkey.pem;
#include /etc/nginx/conf/ssl_params;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 15m;
ssl_session_tickets off;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
#add_header Strict-Transport-Security "max-age=<HSTS_MAX_AGE>;<HSTS_SUBDOMAINS><HSTS_PRELOAD>";
client_max_body_size 10G;
location /n/ {
alias /usr/share/nginx/html/;
index index.html index.htm;
}
location /nextcloud/ {
access_log off;
proxy_set_header X-Real_ip $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://192.168.178.11/;
}
location ^~ /c{
rewrite ^/c(.*) /$1 break;
proxy_pass https://192.168.178.11/;
proxy_connect_timeout 1;
proxy_set_header Host $http_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;
}
location/{
root /usr/share/nginx/html;
index index.html index.htm;
}
}
}
힘이 도움이 될 수> : https://github.com/evertramos/docker-compose-letsencrypt- https://github.com/evertramos/docker-nextcloud-letsencrypt와 함께 nginx-proxy-companion – Evis