服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. linux nginx
  3. 如何使用nginx子filterreplacejs文件variables
Intereting Posts
RewriteRules不会停止与最后一个标志? 无法telnet我的电脑 永久启用SCL 安装时,Autofs总是使用uid 0 Samba服务器不能在启动时启动 IIS重写规则检查查询string,并添加它,如果它不存在 允许用户使用postfix发送邮件 Nginx的Magentoconfiguration不工作,404安装 无法通过Sql Server 2008 Configuration Manager访问任何服务 在局域网外部确保虚拟机的安全 如何拒绝Nginx中的子域请求 头版不断被黑客攻击 configurationiptables允许来自WAN(networking)的入站/出站绑定连接,并且只允许局域网上的几台PC同时阻塞其他任何东西 Apache2 VirtualHost IfPort? 与内部域交换:如何使会议请求工作?

如何使用nginx子filterreplacejs文件variables

我想在运行时使用NGINX子filterreplacejs文件中的IP。
我已经添加了sub_filter的位置,但它不工作。

我的nginx.config文件是

location ~ \.js { sub_filter "###IP###" "$remote_addr"; sub_filter_once off; sub_filter_types application/x-javascript; add_header Content-Type application/x-javascript; } 

而我的JS代码是

 var IP = "###IP###"; console.log(IP); 

但IP在这样的控制台中打印###IP###

  • 静态路由在有两个NIC的Linux服务器上有时会停止工作
  • 如何禁用laravel中的文件URL的gzip
  • 在Upstart脚本中以非root用户身份运行守护程序
  • openvpn – 添加对等体时存在文件
  • syslog-ng 3.2.5服务器停止接收数据,可能与logrotate有关

我的代码中有什么问题?

  • 端口不在Centos 7中
  • Apache错误“无法绑定到地址”
  • 系统模板有多个值
  • 与更多类似的进程配对时,进程CPU%会翻倍
  • TFTP传输超时Centos7
  • TLS握手错误
  • 挂载+testing挂载点从fstab真正安装到相关的分区
  • 在proxmox中的虚拟机之间共享硬盘的最佳方式
  • rsync之后权限被拒绝(publickey)
  • iperf带宽小于接口速度
  • 我应该使用SO_REUSEPORT,如果在许multithreading中使用相同的IP:端口有多个套接字接受器?
  • 如何在债券中find从属接口的信息?
  • 避免bash脚本等待用户input回车键
  • 等同于networking状态的network-online.target
  • 不能在Centos7上针对AD进行ISE(802.1)authentication

  • © 2017 服务器 Gind.cn
  • Topics
  •        
  • Powered by Server
  • Privacy Policy