通过外部APIGATEWAY连接到NGINX。一切都在DOCKER中设置。 在外部APIGATEWAY中,重定向到andrzej localhost下的容器NGINX:8080 / nginx / angular 已配置NGINX容器:
Angular 7-基础herf:“ /”
当浏览器输入地址时:localhost:8080 / nginx / angular 浏览器可以看到我的index.html,其余文件有问题。浏览器返回404,因为它找不到例如位于http:// localhost:8080 / styles.4f1faf20c782bcaec8df.css
的样式worker_processes 1;
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
include /etc/nginx/mime.types;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/json;
location / {
try_files $uri $uri/ /index.html;
}
}
}