cost 345 ms
我可以只使用 ngnix 和 express 提供除 html 之外的所有 static 文件吗

[英]can i just serve all static files except html with ngnix and express

通常我看到人们用这样配置的 ngnix 服务 html 在我的例子中,我使用带有 express 的模板引擎,我不希望 ngnix 服务 html,而是我希望 ngnix 服务公共文件夹 css、js、svgs 等中的所有 static 文件。公共文件夹 有没有一种方法可以配置 ngnix 来提供这 ...

Django Static 即使在 collectstatic 之后也不能用于生产

[英]Django Static doesn't work on production even after collectstatic

我遇到了问题,无法解决。 寻找一些建议! 好的所以在本地一切正常,我已经运行 collect static 并且我在我的 django 应用程序文件夹中的名为“static”的文件夹下收集了静态文件: 所以在本地运行,没有一个错误和管理员有 css 当我推动生产时,我的应用程序运行,代理(nginx ...

Ingress nginx路径路由

[英]Ingress nginx path routing

我在 AKS 上部署了一个 React 应用程序,应用程序登录页面的 URL 是https://myapp.host.com/dev/ 目前该应用程序有多个屏幕可以导航,例如:/profile 当我单击配置文件导航按钮时,它会重定向到这个 url: https://myapp.host.com/pr ...

Nginx expressjs 应用程序中婴儿车的反向代理

[英]Nginx resverse proxy for prams in an expressjs application

我在 expressjs 应用程序中有一条路线,代码如下。 ... ... 我想设置我的 nginx 代理以转发 id。 nginx 的 conf 文件在这里... server { root /var/www/html; ... 我的反向代理文件有什么问题。 现在我已经把它恢复到原来的状态 ...

Spring Boot - 为什么反向代理后应用程序端口连接到dns?

[英]Spring Boot - Why is the app port attached to dns after reverse proxying?

我在 nginx 代理后面创建了一个 spring 引导应用程序。 当从 nginx 端口 80 接收到特定的 dns (example.com) 时,将反向代理配置为 go 到 spring 启动应用程序。(spring 启动的端口为 8080。) 这里奇怪的是,当你连接到example.com ...

如何查看地址,api 请求在具有代理的 nginx 服务器上解析

[英]How to see the address, an api request resolved to on an nginx server with a proxy

我有一个 nginx 配置如下的网络服务器: 在我的申请中,我向 api 提出如下请求: 如果我使用代理在我的开发服务器上发出请求,它会被解析为 一切都很好。 如果我在我的生产 nginx 服务器上发出请求,我会收到Error 502: Bad Gateway 。 在错误日志中,它说: no res ...

如何用清漆返回空响应?

[英]How to return empty response with Varnish?

当请求到达Varnish服务器时,如果请求的服务器名称未知,我想返回一个空响应或简单地关闭连接。 例如,从 nginx(Varnish 的后端)我是这样做的: 因此,当用户/机器人访问地址为 IP 或未知主机的 nginx 服务器时,它会得到: The connection was reset 。 ...

无法使用 docker 中的 nginx 反向代理从外部访问

[英]can't access from outside with nginx reverse proxy in docker

我知道有很多类似的问题,但没有人帮助我。 我有一个 linux 服务器在 docker 中运行 nginx 反向代理,创建了一个 duckdns 域,打开了我的路由器端口 80 和 443。我无法使用我的域名或公共 ip 从外部访问,看来我的路由器拒绝外部请求。 我尝试了很多配置,遵循 web 上的 ...

将 Apache 重写规则(前端控制器)转换为 Nginx

[英]Convert Apache rewrite rules (front-controller) to Nginx

我需要一个小手来修复 Nginx 的重写规则。 文件夹结构是这样的: dev.example.com/public_html << 包含站点在/public_html之外,我们有应用程序和数据文件夹下面是我需要转换的.htaccess 我的 Nginx 配置有点像这样...... 我 ...

如何增加 django/nxginx/uwsgi 页面加载大小限制?

[英]How to increase django/nxginx/uwsgi page load size limit?

我正在使用 nginx 和 uWsgi 以及 django(使用 daphne)来提供一个简单的单页网站。 我已经达到了这样的程度,如果我在页面上放置更多 html 个对象,它会加载到某个点并且不会加载 rest。例如,如果我添加一个包含 60 行的表,网站最多会加载 30 行的表,之后什么也没有 ...

简单的 nginx 错误,但我是盲目的感觉

[英]Simple nginx error but I am blind it feels like

这是我目前的配置,尝试使用 ssl 证书设置此站点。 当我重新启动 nginx 时,它会抱怨:nginx: [emerg] invalid parameter "domain.io," in /etc/nginx/sites-enabled/domain.io:3 我错过了什么? 我目前是配置盲的。 ...

2023-01-15 15:37:33   1   13    nginx  
(111:连接被拒绝)连接到上游时,客户端:xxx 服务器:xxx

[英](111: Connection refused) while connecting to upstream, client: xxx server: xxx

我有一个托管在 nginx 上的 nextjs 应用程序,我试图让重新验证工作,因为它不起作用(我对此也有疑问)并且 discord 中的某人建议检查 nginx 错误日志,我发现了这个错误: 我试过设置 在我的 conf 文件中,我还尝试将 proxy_pass 更改为: 代替 但这并没有奏效。 ...

如何使用 nginx 将服务器上的特定文件作为特定路径提供?

[英]How do I serve a specific file on my server as a specific path with nginx?

我有一个网站example.com ,我想提供以下文件/home/myweb/path/file1.html 作为http://example.com/some/spec/path/ 这意味着,当人们访问http://example.com/some/spec/path/时,他们将在该页面上看到文 ...

2023-01-15 03:09:44   1   15    nginx  
AWS LightSail 域不适用于 www.subdomain

[英]AWS LightSail domain not working with www.subdomain

我有一个 NGINX ubuntu 服务器托管在 AWS LightSail 上。 它使用 http(s)://yourdomain.com 域名正确解析,但不适用于www.yourdomain.com 。 我已经尝试设置指向 IP 的 A 类型记录和指向子域 yourdomain.com 的 C ...

如何拦截 nginx 内的所有传出响应并修改它们?

[英]How can I intercept all outgoing responses within nginx and modify them?

赏金将在 7 天后到期。 此问题的答案有资格获得+300声望赏金。 Marius Anderie希望引起更多人对这个问题的关注。 我有一个 nginx 服务器,通过 php 为论坛提供服务。我想向 nginx 添加一个上游,它拦截 php 应用程序生成的所有响应并修改响应。 是否可以通过修改 n ...

502 Bad Gateway in production with Nextjs next-auth with url '/api/auth/callback/cognito'

[英]502 Bad Gateway in production with Nextjs next-auth with url '/api/auth/callback/cognito'

赏金将在 6 天后到期。 此问题的答案有资格获得+150声望赏金。 Sheldonfrith想让更多人关注这个问题: 第一个为我提供解决问题答案的人将获得赏金,谢谢! 我正在尝试发布一个使用“next-auth”和 aws Cognito 的 nextjs 应用程序。 当我在本地运行它时,无论是 ...

我可以使用 proxy_pass 配置 nginx 以使用代理服务器上的错误文档吗?

[英]Can I configure nginx with proxy_pass to use an error document on the proxied server?

我已经配置了 nginx 和proxy_pass到代理 URL,比如/uploads/foo.png以从 S3 存储桶中获取,但显然丢失的文件会导致丑陋的 XML 错误,我想返回一个 static HTML 文件。 我尝试使用 S3 的“静态网站”功能,但它总是返回(不正确的)403 状态代码和错 ...

nginx如何正确配置域名访问?

[英]How do I properly configure nginx for domain name access?

有这样的配置 网站通过ip地址打开 但不是域名 Hosting有如下配置(添加A已经有几天了) ...

2023-01-13 14:59:49   1   18    nginx  

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM