nginx

add security headers in NGINX while using fastcgi caching

纵然是瞬间 提交于 2021-02-11 14:11:04
问题 I am using nginx with fastcgi cache. I want to use security headers on my site. I have already added add header field in my virtual host configurations but I can not get any headers unless I disable add_header X-fastcgi cache $upstream cache status in my fastcgi_main.conf file. virualhost file : } include /etc/nginx/bots.d/blockbots.conf; include /etc/nginx/bots.d/ddos.conf; include /etc/nginx/skip_cache.conf ; include /etc/nginx/purge_location.conf ; include /etc/nginx/gzip_location.conf ;

how to verify nginx SSL that is forwarding to another nginx that also needs verifying (jitsi)

喜你入骨 提交于 2021-02-11 13:58:41
问题 I am trying to have a subdomain go to a Jitsi Video Chat service on a VM I'm running on my local homelab by way of an nginx reverse proxy. Currently this is how I'm trying to achieve this: I have my subdomain CNAME'd and pointed to a dynamic DNS address provided by NetGear. It sends traffic to my router which has ports 80, 443, and 81 forwarding to my nginx reverse proxy VM. I want the nginx reverse proxy VM to forward to the Jitsi VM (which is also running nginx). I'm doing a simple proxy

how to verify nginx SSL that is forwarding to another nginx that also needs verifying (jitsi)

不羁岁月 提交于 2021-02-11 13:57:46
问题 I am trying to have a subdomain go to a Jitsi Video Chat service on a VM I'm running on my local homelab by way of an nginx reverse proxy. Currently this is how I'm trying to achieve this: I have my subdomain CNAME'd and pointed to a dynamic DNS address provided by NetGear. It sends traffic to my router which has ports 80, 443, and 81 forwarding to my nginx reverse proxy VM. I want the nginx reverse proxy VM to forward to the Jitsi VM (which is also running nginx). I'm doing a simple proxy

Django + Nginx configuration (getting “Welcome to nginx!”)

妖精的绣舞 提交于 2021-02-11 13:56:13
问题 I have Django + Nginx + Gunicorn on Ubuntu. Certificates generated with Letsencrypt. In /etc/nginx/sites-available/myproject I have: server { server_name myproject.com www.myproject.com; listen 80; return 301 https://myproject.com$request_uri; } server { server_name myproject.com www.myproject.com; listen 443; ssl on; ssl_certificate /etc/letsencrypt/live/myproject.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/myproject.com/privkey.pem; client_max_body_size 1G; root /home

PHP面试-复习知识点整理

ぐ巨炮叔叔 提交于 2021-02-11 13:19:54
false的七种情况 整型0 浮点0.0 布尔false 空字符串'',"" 字符串'0' 空数组[] NULL 超全局数组 $GLOBALS,包含下面8个超全局数组的值 $_GET $_POST $_REQUERT,包含$_GET,$_POST,$_COOKIE $_SEESION $_COOKIE $_SERVER $_SERVER['SERVER_ADDR'] //服务器地址 $_SERVER['SERVER_NAME'] //服务名称 $_SERVER['REQUEST_TIME'] //请求时间 $_SERVER['QUERY_STRING'] //请求地址中问号后的内容 $_SERVER['HTTP_REFERER'] //上次请求地址 $_SERVER['HTTP_USER_AGENT'] //浏览器信息 $_SERVER['REMOTE_ARRR'] //客户端请求ip $_SERVER['REQUEST_URI'] // 请求中脚本名称 $_SERVER['PATH_INFO'] // 请求中路径 $_FIELS $_ENV null的三种情况 直接赋值NULL 未定义变量 unset销毁后的变量 常量 一定定义,不可删除和修改 const 更快,是语言结构,可定义类常量 define 是函数 预定义常量 FILE 文件所在路径+文件名 LINE 所在代码行

PHP 面试知识点整理归纳

我的未来我决定 提交于 2021-02-11 13:10:04
这里是我精选出来的内容,原文地址: https://blog.csdn.net/l269798518/article/details/82428601 isset 和 empty isset 用来判断变量是否存在; empty 用来判断变量是否有值 。 $a 不存在和 $a = null 两种情况在 isset 看来为 true ,其余为 false (包括 $a = ‘’ ; ) $a = null, 0, false, ‘ ’ , 或不存在时在 empty 看来为 true ,其余为 false 。 private 、 protected 、 public 、 final 区别 public: 权限是最大的,可以内部调用,实例调用等。 protected: 受保护类型,用于本类和继承此类的子类调用。 private: 私有类型,只有在本类中使用。 static :静态资源,可以被子类继承。 abstract :修饰抽象方法,没有方法体,由继承该类的子类来实现。 final :表示该变量、该方法已经 “ 完成 ” ,不可被覆盖。修饰类时该类不能被继承。 (因此 final 和 abstract 不能同时出现) 抽象类、接口 接口通常是为了抽象一种行为,接口是一种规范,在设计上的意义是为了功能模块间的解耦,方便后面的功能扩展、维护,接口不能有具体的方法 ; 抽象类可以有具体的方法

prometheus — nginx-vts-exporter

守給你的承諾、 提交于 2021-02-11 13:08:47
参考文档: https://blog.51cto.com/xujpxm/2080146 注: 本文留用自己参考,建议看以上参考文档,更为细致 prometheus 监控 nginx 使用 nginx-vts-exporter 采集数据。同时,需要 nginx 支持 nginx-module-vts 模块获取 nginx 自身的一些数据。 #nginx 的模块支持 进入nginx 安装包解压后的目录,下载模块文件 git clone git://github.com/vozlt/nginx-module-vts.git 编译安装,只需要在之前的编译参数中加上 --add-module=/path/to/nginx-module-vts 即可 ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/nginx/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --user=nginx --group=nginx --add-module=./nginx-module-vts make && make install 修改nginx 配置 http { vhost_traffic_status_zone; vhost_traffic_status_filter

docker+mysql基本搭建过程,及修改时间

我们两清 提交于 2021-02-11 13:08:01
修改系统时间 [root@32c64- 0425445 ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/ localtime 或者 [root@32c64 - 0425445 ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/ localtime 或者 [root@32c64 - 0425445 ~ ]# systemctl enable ntpd [root@32c64 - 0425445 ~]# systemctl start ntpd 查询镜像 [root@bms-e4e3 ~ ]# docker search mysql INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED docker.io docker.io /mysql MySQL is a widely used, open-source relati... 7708 [OK] docker.io docker.io /mariadb MariaDB is a community-developed fork of M... 2530 [OK] docker.io docker.io /mysql/mysql-server Optimized MySQL Server Docker

nginx path_info in alias environemnt

邮差的信 提交于 2021-02-11 13:06:07
问题 I need to get this working on nginx with php-fpm: example.com/studip/dispatch.php/admin/user/ The Problem seems to be, that /studip isn't a subfolder under root but a alias to /usr/local/studip/public/ Here's the configuration without the (non working) path_info foo: server { listen 80; server_name example.com; root /var/www/example.com/htdocs; index index.php # Here are a few other subfolders hosted # ... # ... # and now studip: location /studip { alias /usr/local/studip/public/; index index

nginx path_info in alias environemnt

烂漫一生 提交于 2021-02-11 13:03:32
问题 I need to get this working on nginx with php-fpm: example.com/studip/dispatch.php/admin/user/ The Problem seems to be, that /studip isn't a subfolder under root but a alias to /usr/local/studip/public/ Here's the configuration without the (non working) path_info foo: server { listen 80; server_name example.com; root /var/www/example.com/htdocs; index index.php # Here are a few other subfolders hosted # ... # ... # and now studip: location /studip { alias /usr/local/studip/public/; index index