我似乎无法让 Apache 指令ProxyPassReverseCookieDomain实际重写域。
我的指令设置如下:
ProxyPassReverseCookieDomain "myinternalproxydomain.com" "thepublicdomain.com"
Run Code Online (Sandbox Code Playgroud)
我使用浏览器中的“网络”选项卡,可以看到Set-Cookie域没有被更改。我将 Set-Cookie 域视为thepublicdomain.com或.thepublicdomain.com。我尝试过添加
ProxyPassReverseCookieDomain "myinternalproxydomain.com" ".thepublicdomain.com"
Run Code Online (Sandbox Code Playgroud)
我已经搜索并阅读了文档,但是我不明白为什么没有设置 cookie 的域。
<VirtualHost *:443>
DocumentRoot /var/www/myinternalproxydomain.com
ServerName myinternalproxydomain.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/my.crt
SSLCertificateKeyFile /etc/ssl/private/my.key
SSLCACertificateFile /etc/ssl/certs/my.ca-bundle
SSLProxyEngine On
ProxyRequests Off
ProxyHTMLEnable On
ProxyPreserveHost Off
ProxyHTMLInterp On
ProxyHTMLExtended On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPass "/" "https://thepublicdomain.com/"
ProxyPassReverse / https://thepublicdomain.com/
ProxyPassReverseCookiePath / /
ProxyPassReverseCookieDomain "myinternalproxydomain.com" "thepublicdomain.com"
ProxyPassReverseCookieDomain "myinternalproxydomain.com" "thepublicdomain.com"
ProxyPassReverseCookieDomain "myinternalproxydomain.com" ".thepublicdomain.com"
DirectorySlash On
ProxyHTMLURLMap "https://thepublicdomain.com" …Run Code Online (Sandbox Code Playgroud) 我正在创建一个 Web 挑战,由于存在防火墙,我需要能够将 SSH 客户端源套接字绑定到固定端口,以使其流量通过防火墙。
有没有办法使用 Maybenetcat或 Ubuntu 设置来做到这一点?或者可以实现这一目标的 ssh 替代方案?
设想:
执行从旧 Server 2008 R2 到新 Server 2016 的服务器迁移,遵循此服务器故障指南:使用 Robocopy 进行文件服务器迁移
Robocopy 完成后,在 Server 2016 上为复制的卷启用重复数据删除,然后使用 PowerShell 手动开始重复数据删除。几个小时后,它完成并恢复了大约 25% 的磁盘空间。
再次运行 Robocopy 以复制初始副本中可能遗漏的任何内容,作为对新服务器的最终检查。
....但是 Robocopy(从 Server 2016 运行)不理解重复数据删除,因此继续将重复数据删除块存储作为垃圾..
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Sunday, July 8, 2018 12:10:02 PM
Source : \\SERVER-2008\e$\
Dest : \\SERVER-2016\e$\
Files : *.*
Options : *.* /TEE /S /E /COPYALL /PURGE /MIR /ZB /NP /MT:32 /R:1 /W:10
------------------------------------------------------------------------------
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\
*EXTRA Dir -1 \\SERVER-2016\e$\System …Run Code Online (Sandbox Code Playgroud) 在现有的 nginx 反向代理上,我需要将客户端 IP 传递给服务器(从 nginx 到 NG-Engine 中服务的前端,然后从这个到后端),我尝试了很多站点,但服务器只是接收127.0.0.1。额外信息(在 Michael Hampton 问题之后添加),我们的虚拟机基础架构:
我检查了文档,在这里尝试过(包括删除 X-Real-IP 标头,正如他们在另一个问题中所建议的那样)。我还尝试添加:
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For
Run Code Online (Sandbox Code Playgroud)
我的 nginx 有 real_ip 模块(下面 nginx -V 的输出),这是我的 nginx.conf ......我做错了什么?
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# …Run Code Online (Sandbox Code Playgroud) 我正在运行Debian并且必须certbot创建Let's Encrypt证书。
我充当 TLS 服务器的客户端,需要移交我的客户端证书以供批准。
我有以下文件生成certbot:
/etc/letsencrypt/live/my-client-server-domain/privkey.pem
/etc/letsencrypt/live/my-client-server-domain/fullchain.pem
/etc/letsencrypt/live/my-client-server-domain/chain.pem
Run Code Online (Sandbox Code Playgroud)
我应该交出哪个证书,公开共享是否安全?
我正在尝试使用 VirtualBox 从 .ova 开始,并希望稍后在 vSphere 中导入相同的映像。
Ubuntu 云映像不再有标准密码。
我想编辑 .ova 以配置密码。(以及后来的 SSH 密钥)
下载的 .ova 确实有密码属性。
我找到了一个名为cot(Common OVF tool)的工具来编辑属性。
我试过:
cot edit-properties ubuntu-18.04-server-cloudimg-amd64-custom.ova -p password=ubuntu
Run Code Online (Sandbox Code Playgroud)
也试过:
cot edit-properties ubuntu-18.04-server-cloudimg-amd64-custom.ova -p user-data="password: ubuntu"
Run Code Online (Sandbox Code Playgroud)
两次尝试都没有成功。(无法登入)
是否有一个步骤可以将此配置应用到图像中,或者这些属性是否在图像启动时传递给图像?
有任何想法吗?
更新:(背景问题的答案)
我有一张关于服务器磁盘的高 inode 使用率的图表,但我没有任何详细信息(如df -i),所以我想猜测原因。
在查看 Windows 事件日志时,我几乎连续看到以下消息 -
Starting up database 'Database'.
Parallel redo is started for database 'Database' with worker pool size [1].
Parallel redo is shutdown for database 'Database' with worker pool size [1].
这些消息同时发生,并且每秒不断重复。
有人能解释一下什么是并行重做,为什么它不断地启动和停止,并导致数据库不得不重新启动?
该数据库正由使用实体框架的 ASP.NET Web 应用程序使用,该应用程序在 IIS 上运行。Windows Server 2016 Standard 和 SQL Server 14.0.100(Sql Server 2017 Express 版)。
使用 Nginx 作为反向代理,我想注入一个 cookie 供后端系统使用。
location /delegate {
proxy_pass <some-url>;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Request-ID $request_id;
# some more
# here: inject a new cookie into `cookie` request header
}
Run Code Online (Sandbox Code Playgroud)
因为我希望下游系统使用 cookie,所以这与add_header Set-Cookie指令无关(用于返回给客户端的响应)。
我一直在尝试设置一个可以更新的域。我正在使用bind9,我已经用过
ddns-confgen -a hmac-sha512 -k <keyname>
Run Code Online (Sandbox Code Playgroud)
为了生成我的密钥,我已将密钥添加到 /etc/bind/keys.local 中
key "<keyname>" {
algorithm hmac-sha512;
secret "<secret>";
};
Run Code Online (Sandbox Code Playgroud)
我的named.conf 文件如下所示:
include "/etc/bind/keys.local";
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
Run Code Online (Sandbox Code Playgroud)
我的named.conf.local 文件如下所示:
zone "<subdomain_name>" {
type master;
update-policy {
grant <keyname> zonesub ANY;
};
file "<zone_file>"; # zone file path
};
zone "<reverse_zone>.in-addr.arpa" {
type master;
update-policy {
grant <keyname> zonesub ANY;
};
file "<reverse_zone_file>";
};
Run Code Online (Sandbox Code Playgroud)
我错过了一些明显的东西吗?因为当我这样做时:
sudo nsupdate -k <keyfile>
server <dns_server>
zone <subdomain_name>
update add newhost.<subdomain_name> 86400 A <newhost_ip>
send
Run Code Online (Sandbox Code Playgroud)
我最终得到了 …
linux ×2
nginx ×2
ubuntu ×2
apache-2.4 ×1
asp.net-mvc ×1
certbot ×1
cookie ×1
corruption ×1
ddns ×1
inode ×1
lets-encrypt ×1
netcat ×1
nsupdate ×1
port ×1
proxy ×1
robocopy ×1
sql-server ×1
ssh ×1
ssl ×1
swap ×1
virtualbox ×1