如何通过curl从nginx获取静态文件?

如何通过curl从nginx获取静态文件?,curl,nginx,Curl,Nginx,我有这个nginx配置: server { listen 80; client_max_body_size 4G; server_name mysite.ru; location / { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect off; proxy_buffering off; proxy_pa

我有这个nginx配置:

server {
listen 80;
client_max_body_size 4G;

server_name mysite.ru;

location / {
  proxy_set_header Host $http_host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_redirect off;
  proxy_buffering off;
  proxy_pass http://aiohttp;
}

location /static {
  # path for static files
  root /var/www/mysite.ru/public_html;
}
}
我在/var/www/mysite.ru/public_html中有index.html。如何通过curl获取此文件?这些都不起作用:

curl-X GET“”

curl-X GET“”

curl-X GET“”

使用当前配置,将在
/var/www/mysite.ru/public\u html/static/index.html
上搜索此文件。请注意,该位置是通过将
值与URI连接而构建的。更多信息,请参阅


curl-X GET“”

此请求将发送到上游
aiohttp
服务


如果需要从路径名中删除
/static/
路径元素,请使用
alias
指令:

location /static {
    # path for static files
    alias /var/www/mysite.ru/public_html;
}

有关更多信息,请参阅。

在卷曲这些地址时发布输出?你能找到一个浏览器吗?