2017-08-09 46 views
0

没有部署这是我的nginx服务器部署与gunicorn的烧瓶中的应用我的.conf文件,它完美的作品上mysite.xyz我想应用在mysite.xyz/app部署然而,我必须错过了一些东西,因为我无法弄清楚。我试图改变location/{location /app {无济于事。nginx的其他地点

server { 
    listen 80; 
    server_name mysite.xyz; 

    location/{ 
     include proxy_params; 
     proxy_pass http://unix:/var/www/app/app.sock; 
    } 
} 

回答

0

尝试编辑位置,类似的东西;也为什么你不使用fastcgi_pass

server { 
    listen 80; 
    server_name mysite.xyz; 

location/{ 

      # First attempt to serve request as file, then 
      # as directory, then fall back to displaying a 404. 
      try_files $uri $uri/ /index.html; 
    } 

location /app { 
     include proxy_params; 
     proxy_pass http://unix:/var/www/app/app.sock:/app; 
    } 
} 
+0

这似乎没有工作。 :/我得到'的请求的URL没有就当我去mysite.xyz/app –

+0

NVM的server.'发现,这一切现在的工作,不得不改变我的烧瓶文件与/应用/,而不是被开头/ –