我刚刚在RHEL 7.1 VM上安装了最新的工头实例。 现在它已经安装了,httpdconfiguration已经改变了,所以工头URI是http(s)://(server)/。 这已经打破了服务器上运行的其他所有东西,如nagios。 我已经尝试更改默认领工configuration为http(s):/ /(服务器)/工头,但在这个时候什么都没有工作。 以前相同的问题在Foreman & After Foreman安装 服务目录列表 ,我的Icinga界面不工作被问到。 但是如何解决这个常见问题却从未有过答案。 这是说我曾尝试使用 Alias /foreman "/usr/share/foreman/public" 在05-foreman.conf&05-foreman-ssl.conf的configuration文件中没有运气。
我有一个httpd.conf的“规则”来popup一个窗口,如果有人试图访问wordpress安装的任何域的wp-admin部分。 有了这个规则,我阻止了访问wp-admin文件夹的引导,并阻止暴力攻击。 # BEGIN BLOCK-WP-ADMIN-ATTACK <Files wp-login.php> AuthType basic AuthName "EN: Human Check – U: human P: letmein" AuthBasicProvider file AuthUserFile /home/wp-admin-attack-htpasswd-file Require valid-user ErrorDocument 401 "<center><h1>Warning!</h1>You failed to authenticate.<p><br />Extra security has been temporarily enabled due to an ongoing attack against WordPress logins on this server.<br /> <b>If you are a real user, please […]
我想在apache中testing一个configuration。 我怎样才能“debugging”configuration文件? 例如,假设我有: <IfModule mod_geoip.c> GeoIPEnable On GeoIPDBFile PATH_TO_LIB\GeoIP.dat GeoIPEnableUTF8 On GeoIPOutput All </IfModule> 我可以在本地发送伪造的IP到头部吗? (即)我可以在本地伪造/剥离另一个IP比127.0.0.1?
设置Apache服务器时,主服务器部分指出以下内容: # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # <VirtualHost> definition. These values also provide defaults for # any <VirtualHost> containers you may define later in the file. # # All […]
我们有两个站点,sub.example1.com和example2.com。 两者都不是专门configuration来处理SSL请求。 一个站点https:/sub.example1.com通过处理作为http请求来成功处理到端口443的安全请求。 对其他站点https://example2.com的安全请求超时并在Apache日志中logging“\ x16 \ x03 \ x01”错误。 这里是/ etc / httpd / sites-enabled / ServerAdmin webmaster @ localhost ServerName sub.example1.com DocumentRoot /opt/example1/web/ DirectoryIndex index.php index.html <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /opt/example/web/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all # This directive allows us to have apache2's […]
可以将以下用于Apache 2.4的AliasMatch语句合并为一个? AliasMatch ^/([0-9]{6})$ /var/www/data/$1 AliasMatch ^/([0-9]{6})/(.*)$ /var/www/data/$1/$2
我目前有静态和dynamic页面单独的访问日志。 我的httpd.conf有(在<VirtualHost>中 ): <LocationMatch "^/(img|js|css|thumb|banner)/(.+)$"> SetEnv static 1 </LocationMatch> CustomLog /var/log/apache2/gopal.log myCustom env=!static CustomLog /var/log/apache2/gopal-static.log myCustom env=static 我想补充它 SetEnvIf Remote_Addr "127.0.0.1" dontlog CustomLog /var/log/apache2/gopal.log myCustom env=!dontlog ,但找不到一个使用CustomLog expr =参数的例子,无法猜测一个工作expression式: expr=!(reqenv('static')||reqenv('dontlog'))产生 语法错误,意外的T_OP_OR
在为我的主网站创build特定的虚拟主机之前 login到主IP地址打开了Apache默认的欢迎页面 但创build此虚拟主机后,domain.com工作正常,但IP地址打开的domain.com相同的内容 # /etc/httpd/conf.d/domain.com.conf <VirtualHost *:80> ServerName www.domain.com ServerAlias domain.com DocumentRoot /var/www/domian.com/public_html ErrorLog /var/www/domian.com/error.log CustomLog /var/www/domian.com/requests.log combined </VirtualHost> 我不想更改apache欢迎页面 更新 我把这个代码放在我的网站虚拟主机的内容之前来解决问题 <VirtualHost _default_:80> DocumentRoot /var/www/html </VirtualHost>
我pipe理的一个服务器正在被一个糟糕的编码的AWS构build的机器人所困扰,这个机器人不断地切换IP并且似乎卡在一个recursion编码循环中。 我能看到的唯一一致的指纹是每个请求只是一个HEAD请求,每个请求似乎都重新编码了前一个请求。 所以http://someurl.com/?foo=%25bar成为..%2525..变成..%252525.. … %2525252525252525…x1000 ..%252525.. … ..%252525.. 。 以下是我看到的请求types的示例: HEAD http://example.com/?foo=%25bar HEAD http://example.com/?foo=%2525bar HEAD http://example.com/?foo=%252525bar HEAD http://example.com/?foo=%25252525bar HEAD http://example.com/?foo=%2525252525bar HEAD http://example.com/?foo=%2525252525…25bar (x1000) 到目前为止,我一直在使用Cloudflare防火墙来阻止每个IP,但他们保持切换IP。 我怎样才能阻止所有包含子string的HEAD请求(比如%25252525 )? 我正在运行Apache/2.4.6 (CentOS) 。
我有一个Apache的httpd服务器后面的docker服务器。 我正确地处理标题将被返回到我在docker级收到的请求。 但有时apache httpd添加一些标题(通常是Content-Type ),我不希望它们被添加到我的响应中(我将它们在docker中过滤掉)。 我试图通过在/etc/httpd/conf/httpd.conf注释以下行来加载headers_mod ,但是这并没有解决问题: LoadModule headers_module modules/mod_headers.so 而当看着我可以在mod_headers文档中使用的命令,我没有看到任何人可以用来静音httpd! 任何想法如何我可以强制httpd的行为,我想?