如何从其他angular应用程序组件调用a组件-缺少nginx配置?
我目前的问题是,我有两个Angle应用程序,因为它们具有不同的配置和样式,但是我的问题是我想使用代理反向和SSL通过nginx调用或路由一个应用程序到另一个,实际上我的配置超过两个配置文件,但是当一个试图呼叫另一个时,我得到了一个错误,比如路由错误,我不知道是角边的一部分还是Nginx边的一部分,有人能在这方面帮助我吗?我将发布一个我如何拥有我的结构的示例如何从其他angular应用程序组件调用a组件-缺少nginx配置?,angular,ubuntu,ssl,nginx,certificate,Angular,Ubuntu,Ssl,Nginx,Certificate,我目前的问题是,我有两个Angle应用程序,因为它们具有不同的配置和样式,但是我的问题是我想使用代理反向和SSL通过nginx调用或路由一个应用程序到另一个,实际上我的配置超过两个配置文件,但是当一个试图呼叫另一个时,我得到了一个错误,比如路由错误,我不知道是角边的一部分还是Nginx边的一部分,有人能在这方面帮助我吗?我将发布一个我如何拥有我的结构的示例 配置一 服务器{ 监听80个默认_服务器 server_name _; return 301 https
- 配置一
服务器{
监听80个默认_服务器
server_name _; return 301 https://$host$request_uri; } server { listen 443; listen [::]:443; root /var/www/html/; ssl on; ssl_certificate /etc/nginx/example.crt; ssl_certificate_key /etc/nginx/ssl/example.key; server_name example.com; location / { proxy_pass http://localhost:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
server_name _; return 301 https://$host$request_uri; } server { listen 443; listen [::]:443; root /var/www/html/; ssl on; ssl_certificate /etc/nginx/example.crt; ssl_certificate_key /etc/nginx/ssl/example.key; server_name example.com; location /login { proxy_pass http://localhost:8089; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
- 配置二
服务器{
监听80个默认_服务器
server_name _; return 301 https://$host$request_uri; } server { listen 443; listen [::]:443; root /var/www/html/; ssl on; ssl_certificate /etc/nginx/example.crt; ssl_certificate_key /etc/nginx/ssl/example.key; server_name example.com; location / { proxy_pass http://localhost:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
server_name _; return 301 https://$host$request_uri; } server { listen 443; listen [::]:443; root /var/www/html/; ssl on; ssl_certificate /etc/nginx/example.crt; ssl_certificate_key /etc/nginx/ssl/example.key; server_name example.com; location /login { proxy_pass http://localhost:8089; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
您应该将路线配置添加为代码,而不是屏幕截图。好的,让我更改它