0
複数のサーバーから複数のアプリケーション用にNginxプロキシーをセットアップしようとしています。ブラウザでhttps://192.168.2.28/dashboardを実行している間Nginxプロキシー複数の場所で複数のサーバー
server {
listen 80;
listen 443 ssl;
server_name 192.168.2.28;
ssl on;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
location /dashboard/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
proxy_connect_timeout 300;
port_in_redirect off;
proxy_pass http://192.168.1.250/;
}
}
私は唯一のルートファイルは/favicon.pngしかし、JS/CSSのような内部のサブフォルダの場所で解決されていないすなわち取得しています。
内部ディレクトリを持つドメインでドメインを解決する方法。私もスクリーンショットを添付しました。誰でも、確認して解決してください。
ご返信ありがとうございますが、外部のウェブサイトから静的なファイルが必要です。 http://192.168.1.250/static/css/main.9c622a2d.cssからプロキシサーバーへ=> http://192.168.2.28/dashboard/static/css/main.9c622a2d.css – user204534
ご清聴ありがとうございます。回答が更新されます。 1つの小さなこと:実際のIPを使用することは悪い習慣と考えられています。 – joppich