我下面这个教程https://medium.com/startup-founder-panel/deploying-a-meteor-app-with-nginx-from-scratch-1332b32e99a5
当我这样做sudo nginx -t
,我得到
nginx: [emerg] "map" directive is not allowed here in /etc/nginx/sites-enabled/app:2
nginx: configuration file /etc/nginx/nginx.conf test failed
Run Code Online (Sandbox Code Playgroud)
这是应用程序文件
# this section is needed to proxy web-socket connections
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# HTTP
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
location = /favicon.ico {
root /home/USERNAME/portal/programs/web.browser/app;
access_log off;
}
location ~* "^/[a-z0-9]{40}\.(css|js)$" {
gzip_static on;
root /home/USERNAME/portal/programs/web.browser;
access_log off;
}
location ~ "^/packages" {
root /home/USERNAME/portal/programs/web.browser;
access_log …
Run Code Online (Sandbox Code Playgroud)