构建角度应用后,
当我运行docker文件时,我无法加载页面,
在我的控制台里面,它给了我这个警告:这是我的nginx-custom.conf文件:
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
self.extensionContext?.widgetLargestAvailableDisplayMode = NCWidgetDisplayMode.expanded
}
func widgetActiveDisplayModeDidChange(_ activeDisplayMode: NCWidgetDisplayMode, withMaximumSize maxSize: CGSize) {
if activeDisplayMode == NCWidgetDisplayMode.compact {
//compact
self.preferredContentSize = maxSize
} else {
//extended
self.preferredContentSize = CGSize(width: 0, height: 200)
}
}
DockerFile:
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}
}
答案 0 :(得分:0)
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/javascript max;
~image/ max;
}
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}
这里是参考url