nginx

Amazon Elastic Beanstalk ebextension

折月煮酒 提交于 2021-01-29 10:52:19
问题 I want to config the nginx config with the ebextension at Amazon Elastic Beanstalk, The content of the conf as below: files: "/etc/nginx/conf.d/custom-nginx-proxy.conf" : mode: "000755" owner: "root" group: "root" content: | client_max_body_size 60M; contatiner_commands: reload_nginx: command: "sudo service nginx reload" but always got the error about the content, nginx: [emerg] unknown directive "files:" in /var/elasticbeanstalk/staging/nginx/conf.d/custom-nginx-proxy.conf:7 I put this file

NGINX server not applying the CSS files

血红的双手。 提交于 2021-01-29 09:34:02
问题 I have a create-react-app based React App. I am currently serving it using NGINX. I generated the build directory and serving it as a root in NGINX. My NGINX conf currently looks like this: http { server { listen 80; root /home/react-app/build; index index.html; location / { try_files $uri /index.html; } } } However when I load the page, the JS and html files are loading. However the CSS is not being applied. Also, when I checked the network tab in browser developer tools, I see that the CSS

搭建Harbor企业级docker仓库

99封情书 提交于 2021-01-29 09:24:30
一、Harbor简介 1.Harbor介绍 Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全、标识和管理等,扩展了开源Docker Distribution。作为一个企业级私有Registry服务器,Harbor提供了更好的性能和安全。提升用户使用Registry构建和运行环境传输镜像的效率。Harbor支持安装在多个Registry节点的镜像资源复制,镜像全部保存在私有Registry中, 确保数据和知识产权在公司内部网络中管控。另外,Harbor也提供了高级的安全特性,诸如用户管理,访问控制和活动审计等。 2.Harbor特性 基于角色的访问控制 :用户与Docker镜像仓库通过“项目”进行组织管理,一个用户可以对多个镜像仓库在同一命名空间(project)里有不同的权限。 镜像复制 : 镜像可以在多个Registry实例中复制(同步)。尤其适合于负载均衡,高可用,混合云和多云的场景。 图形化用户界面 : 用户可以通过浏览器来浏览,检索当前Docker镜像仓库,管理项目和命名空间。 AD/LDAP 支持 : Harbor可以集成企业内部已有的AD/LDAP,用于鉴权认证管理。 审计管理 : 所有针对镜像仓库的操作都可以被记录追溯,用于审计管理。 国际化 : 已拥有英文、中文、德文、日文和俄文的本地化版本

react - docker host not found in upstream

流过昼夜 提交于 2021-01-29 08:49:18
问题 I released my reactJs application. I have code information as below. But I get the error "11 # 11: host not found in upstream". where could i have made a mistake Could you help ? I get an upStream error even though my docker, nginx, and docker-compose file is correct. I had run the same codes before but I could not find where I made changes. default.conf ` upstream frontend_server{ server web:3000; } server{ listen 80; resolver 127.0.0.11; location /.well-known/acme-challenge/ { root /var/www

NGINX htpasswd 404 not found

。_饼干妹妹 提交于 2021-01-29 08:32:09
问题 I am using NGINX to run my website, I wanted to enable authentication to the website, so I did, using .htpasswd file and it worked, here's part of my default.conf file: server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; auth_basic "Administrator Login"; auth_basic_user_file /usr/share/nginx/html/.htpasswd; location / { root /usr/share/nginx/html; index index.html index.html; } And it works, this way my WHOLE page requires

高性能 Nginx HTTPS 调优!为 HTTPS 提速 30%

☆樱花仙子☆ 提交于 2021-01-29 08:14:45
点击上方“ 民工哥技术之路 ”,选择“设为星标” 回复“ 1024 ”获取独家整理的学习资料! 为什么要优化 Ngin HTTPS 延迟 Nginx 常作为最常见的服务器,常被用作负载均衡 (Load Balancer)、反向代理 (Reverse Proxy),以及网关 (Gateway) 等等。一个配置得当的 Nginx 服务器单机应该可以期望承受住 50K 到 80K 左右每秒的请求,同时将 CPU 负载在可控范围内。 但在很多时候,负载并不是需要首要优化的重点。比如对于卡拉搜索来说,我们希望用户在每次击键的时候,可以体验即时搜索的感觉,也就是说,每个搜索请求必须在 100ms - 200ms 的时间内端对端地返回给用户,才能让用户搜索时没有“卡顿”和“加载”。因此,对于我们来说,优化请求延迟才是最重要的优化方向。 这篇文章中,我们先介绍 Nginx 中的 TLS 设置有哪些与请求延迟可能相关,如何调整才能最大化加速。然后我们用优化卡拉搜索Nginx 服务器的实例来分享如何调整 Nginx TLS/SSL 设置,为首次搜索的用户提速 30% 左右。我们会详细讨论每一步我们做了一些什么优化,优化的动机和效果。希望可以对其它遇到类似问题的同学提供帮助。 TLS 握手和延迟 很多时候开发者会认为:如果不是绝对在意性能,那么了解底层和更细节的优化没有必要。这句话在很多时候是恰当的

Nginx redirect all traffic to index.php, but don't allow arbitrary file access

China☆狼群 提交于 2021-01-29 08:10:33
问题 I have a legacy PHP app (Zend Framework) that I'm moving from Apache to Nginx. Except for things like web files (JS, CSS, images, fonts, etc.), all traffic needs to go through the index.php file in the root of the project folder. So I need to redirect all traffic to index.php , except for web files. There are a lot of solutions to this that use try_files as a catch-all. Basically if a file is not found on the filesystem, nginx will send the request to index.php . The problem with this is that

Kubernetes NGINX Ingress: Disable Basic Auth for specific path

不羁的心 提交于 2021-01-29 07:53:40
问题 I want to disable basic auth only on a specific subpath of my App. How this can be done? e.g. All subpaths should be basic auth secured: / This path should be an exception and public reachable: /#/public ingress.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: app labels: app: app annotations: kubernetes.io/ingress.class: nginx kubernetes.io/tls-acme: "true" ingress.kubernetes.io/auth-type: basic ingress.kubernetes.io/auth-secret: basic-auth ingress.kubernetes.io/auth-realm:

Laravel & Valet: Failed to open stream

天涯浪子 提交于 2021-01-29 07:30:18
问题 I'm trying to setup a Laravel project on Valet. I'm getting this error: Warning: require(/Users/davina/Developer/learn-laravel-graphql/public/../vendor/autoload.php): failed to open stream: No such file or directory in /Users/davina/Developer/learn-laravel-graphql/public/index.php on line 24 Fatal error: require(): Failed opening required '/Users/davina/Developer/learn-laravel-graphql/public/../vendor/autoload.php' (include_path='.:/usr/local/Cellar/php/7.3.1/share/php/pear') in /Users/davina

Dotnet core identityserver4 reverse proxy

守給你的承諾、 提交于 2021-01-29 07:15:49
问题 Hi everybody I have a problem with my reverse proxy configuration for my dotnet core application. My problem is that when I am using identityserver discovery endpoint the port number is missing from the end of my url. I have a request for the discorvery document to https://:8421/.well-known/openid-configuration and the response is the following and the problem here is that the clients of the authentication service are using the document as a base for verification, using jwks_uri property from