Articles of configuration

Webmin在哪里存储其防火墙configuration?

我想将iptables的防火墙configuration从一台服务器复制到另一台服务器。 两台服务器都运行Debian Squeeze并安装了Webmin 1.660,所以我想复制Webmin使用的configuration。 我无法在“/ var / webmin”,“/ etc / iptable *”,“/ etc / sysconfig / iptables”或“iptables.up.rules”中find它。 “/ var / lib / iptables / active”是当前的configuration,当我编辑它时,这些更改不会显示在Webmin中。 虽然,当我点击“恢复configuration”时,我的更改将丢失在该文件中并被replace。 我必须复制哪个文件?

在NSD / BIND区域configuration文件中,条目/loggingtypes的顺序是否重要?

我试图简化DNSlogging添加到NSD安装。 它看起来像使用与BIND相同的语法,所以这个问题可能是相关的。 看起来,我在当前的区域文件中看到的约定是将区域configuration文件中的SOA,MX,NS,A,CNAME,TXTlogging分离成它们自己的节,在本例中用分号分隔一节下一个。 我相信这只是为了美观,唯一真正的要求是SOA是第一个logging,之后的顺序应该不重要。 我想知道是否有其他人可以validation这一假设

如何有条件地为通过nginx中的X-Accel-Redirect提供的字体添加Access-Control-Allow-Origin头

我试图通过一个PHP脚本来告诉nginx使用X-Accel-Redirect进行内部X-Accel-Redirect 。 由于脚本提供了许多types的文件,我只希望为字体添加Access-Control-Allow-Origin标头。 这是我尝试过的configuration: location /deploys/ { internal; alias /www/deploys/; expires 1y; add_header Access-Control-Allow-Origin *; } 这种方法的问题是现在所有的文件都包含Access-Control-Allow-Origin头文件。 我只想要我的字体有这个头。 所以,我尝试了一个条件: location /deploys/ { internal; alias /www/deploys/; expires 1y; if ($request_filename ~* ^.?/([^/]?)$) { set $filename $1; } if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){ add_header Access-Control-Allow-Origin *; } } 不幸的是,这不起作用(我怀疑这是由于使用X-Accel-Redirect的内部redirect)。 如何使用X-Accel-Redirect为一些扩展添加Access-Control-Allow-Oirgin头?

如何在php-fpm www.conf中有条件地设置php会话cookie?

我需要使用php-fpmconfigurationdynamic设置PHP会话cookie域,伪代码如下所示: <If "%{HTTP_HOST} !~ /[0-9]/"> php_value[session.cookie_domain] = ".mysite.com" </If> <If>指令在Apacheconfiguration中工作。 但是,我需要这个在www.conf ,它看起来像一个php.ini文件。 怎么做?

在注销时使用漫游configuration文件时删除本地configuration文件

我目前正在构build一个能够在20个AppServer上托pipe约5,000个用户的环境。 我已经完成了我的GPO,但是在漫游configuration文件实施时遇到了用户本地configuration文件的问题。 漫游部分完美地工作,因为用户的configuration文件在中央networking位置存储和更新。 我唯一的问题是当用户注销时,它们在C:\Users下的本地configuration文件不会被删除。 因为我想最小化AppServer的C:\空间,所以我正在寻找一个GPO,在注销期间干净地删除本地configuration文件。 也就是说,它将删除文件夹C:\Users\%username%和AppServer上的用户registry entry 。 我试图实现以下的GPO(见下文),但不幸的是,它不工作。 Computer Configuration -> System -> User Profiles "Delete cached copies of roaming profiles" 顺便说一句,文件夹redirect工作和设置移动AppData和Documents到漫游configuration文件的networking共享。 我还读到,将我的用户添加到Domain Guest组将在注销期间自动从C:\Users中删除configuration文件。 然而,我不知道通过添加我的用户到这样的组可能遇到什么其他问题。 所以我想知道是否有其他的select。 我总是可以写一个PS脚本,但我想避免设置一个注销脚本。 – 谢谢。

connect-to-oracle-db-9i server-using-ssh-tunnel-via-putty

我试图连接NAT后面的ORACLE DB,所以我通过puttyselectSSH TUNNEL,所以这里是信息 全局ip示例:122.54.34.12 局域网ip例如:192.168.3.103 ORACLE DB_PORT:1521 这里是putty ssh隧道设置 L1521 122.54.34.12:1521 所以我连接到全球IP ssh会话,每一件事情都可以告诉现在,但是当我想通过SQL控制台连接ORACLE DB后,SSH隧道 sql > connect username/[email protected]/service-name ERROR: ORA-12170:TNS Connect timeout occurred

用于编辑特定网站的应用程序主机文件的IIS GUI界面,而不是默认应用程序

我注意到,曾经有一个pipe理包V1用于IIS对applicationHost.config进行非默认的应用程序修改,但它似乎不再可用于下载。 “使用configuration编辑器编辑集合” 。 不知道这个工具是否被replace为另一个。 我安装了“IIS 7.5的应用程序初始化1.0”。 我可以到达IISpipe理器中寻找的defaultapppoolconfiguration区域。 但是,我似乎无法通过本教程“自动启动ASP.NET应用程序(VS 2010和.NET 4.0系列)”中所需的GUI界面进行编辑。 特别是从教程中,我想使用GUI在applicationHost.config中编辑/添加以下部分和属性: <applicationPools> <add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0" startMode="AlwaysRunning" /> </applicationPools> <sites> <site name="MySite" id="1"> <application path="/" serviceAutoStartEnabled="true" serviceAutoStartProvider="PreWarmMyCache" /> </site> </sites> <serviceAutoStartProviders> <add name="PreWarmMyCache" type="PreWarmCache, MyAssembly" /> </serviceAutoStartProviders>

允许端口扫描psad中的特定地址

如何在psad中启用特定地址(或范围)的端口扫描? 默认情况下,我从我自己的监控服务获得大量日志。 我怎么能告诉psad把我的地址或域名视为可信任的? 我想避免将它们添加到/etc/hosts.allow文件。 以下是示例日志文件消息: Scanned UDP ports: [36604-53945: 3 packets, Nmap: -sU] iptables chain: INPUT, 3 packets Source: abc200 DNS: ns3-cache.example.com Destination: abc185 DNS: my.machine.example.com

基于全局variables在Nginx中设置server_name

我有一个nginx的服务器,运行一个生产站点,在不久的将来应该换成一个新的站点。 为了做好准备,我正在准备运行新站点所需的所有configuration。 我想要的是在主要的nginx.conf中有一个全局variables,它包含一个string(例如'old'或'new'代表在主域example.com上活动的站点,而另一个站点在其他站点上other.example.com 。 我试过了: 在nginx.conf http{ … set $site_in_production 'new'; … include /etc/nginx/conf.c/*.conf; } 在/etc/nginx/conf.d/example.com.conf server{ … if($site_in_production='new'){ server_name other.example.com; } else { server_name example.com www.example.com; } … } 在/etc/nginx/conf.d/new.example.com.conf server{ … if($site_in_production='new'){ server_name example.com www.example.com; } else { server_name other.example.com; } … } 但是,当运行一个configtest我得到这个错误: nginx: [emerg] "set" directive is not allowed here in […]

Nginxconfigurationredirect到$ URI

我有一个nginx的问题。 如果你打电话给“example.com”或者“example.example.com”,nginx会像我想要的那样将它redirect到“www.example.com”。 但是,如果我input如下所示的URI,则不会redirect:“example.com/doesnt-redirect”。 它不会添加“www”。 部分,因此,我从我的博客网站获得404。 我的configuration是: server { listen 80; server_name www.example.com *.example.com; if ($http_host != "www.example.com") { return 301 http://www.example.com$request_uri; } root /home/ghost/; index index.html; }