我希望Apache在授权用户进入网站之前validation客户的authentication。 在Chrome中,我的错误是: 192.168.2.57 didn't accept your login certificate, or one may not have been provided. Try contacting the system admin. ERR_BAD_SSL_CLIENT_AUTH_CERT` 在Firefox中,我的错误是: An error occurred during a connection to 192.168.2.57. SSL peer was unable to negotiate an acceptable set of security parameters. Error code: SSL_ERROR_HANDSHAKE_FAILURE_ALERT` 我认为问题在于我甚至没有提示提供我的客户端证书。 我怎样才能启用这两个浏览器? 其他一些信息:我的根和中间的CA存储在Apache上。 他们签署了我的站点证书和我的客户端证书,这些证书也存储在Apache上。 所有这些证书(根CA,中间CA,服务器和客户端)已经加载到我的浏览器。 我的Apacheconfiguration: <IfModule mod_ssl.c> <VirtualHost 192.168.2.57:443> […]
我不知道如何禁用“。well-known”目录的身份validation。 当我删除特定于SVN的指令(DAV,SVNPath,AuthzSVNAccessFile)时,情况就像预期的那样。 <VirtualHost *:443> ServerName www.example.com DocumentRoot "C:/www.example.com" ServerAdmin [email protected] SSLEngine On SSLCertificateFile "C:/Apache2/conf/ssl/www.example.com.crt" SSLCertificateKeyFile "C:/Apache2/conf/ssl/www.example.com.key" <Location /> DAV svn SVNPath "C:/svnrepo" SSLRequireSSL AuthName "www.example.com" AuthType Basic AuthUserFile "conf/svn/svn-users.txt" AuthGroupFile "conf/svn/svn-groups.txt" AuthzSVNAccessFile "conf/svn/svn-access.txt" Require valid-user </Location> <Location "/.well-known"> Satisfy Any Allow from all Require all granted #AuthType None # Apache 2.4 only </Location> </VirtualHost> 编辑:这也将工作,如果我没有重叠的path。 […]
设置了SSL并使用在互联网上发现的一些修改configuration后,我无法访问我的网站使用IP地址它总是redirect到我的https://example.com 。 这是我的configuration: default-ssl.conf <IfModule mod_ssl.c> <VirtualHost *:80> Redirect "http://100.100.100.100/" "https://100.100.100.100/" Redirect "http://example.com" "https://example.com/" </VirtualHost> <VirtualHost _default_:443> ServerAdmin [email protected] ServerName example.com ServerAlias www.example.com DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on ##SSL Configs here <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 BrowserMatch […]
我正在设置Modsecurity,而且我注意到一些敏感数据(信用卡号)最终在日志中。 我应该如何防止呢? 最好是我希望它被logging,但与敏感的数据损坏。 access.log中敏感行的示例 id_offer=28&ch_name=%27+or+1%3D1&ch_address1=Korvstolsv%E4gen+2&ch_address2=&ch_zip=756+48&ch_city=STOCKHOLM&ch_email=aslask%40test.net&ch_phone=018-9999999&cardno=1234456712342345&cvc=123&expire_month=–&expire_year=–&send=Avbryt 也许它可能是这样的呢? (滚动到右侧,敏感字段是cardno和cvs) id_offer=28&ch_name=%27+or+1%3D1&ch_address1=Korvstolsv%E4gen+2&ch_address2=&ch_zip=756+48&ch_city=STOCKHOLM&ch_email=aslask%40test.net&ch_phone=018-9999999&cardno=manglemanglemangle&cvc=xxx&expire_month=–&expire_year=–&send=Avbryt 如果包含敏感数据,则可以select完全删除该部分。 由于我应该使用POST而不是GET的评论,这是一个POST。 –36b1f462-A– [30/May/2017:19:06:55 +0200] WS2mrwpABwsAACy1A9wAAAAG 185.624.636.40 61597 610.64.66.8 445 –36b1f462-B– POST /wb/e/check.php HTTP/1.1 Host: example.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: sv-SE,sv;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate, br Content-Type: application/x-www-form-urlencoded Content-Length: 216 Referer: https://example.com/wb/e/auth.php Connection: keep-alive Upgrade-Insecure-Requests: 1 –36b1f462-C– id_offer=28&ch_name=%27+or+1%3D1&ch_address1=Korvstolsv%E4gen+2&ch_address2=&ch_zip=756+48&ch_city=STOCKHOLM&ch_email=aslask%40test.net&ch_phone=018-9999999&cardno=1234456712342345&cvc=123&expire_month=–&expire_year=–&send=Avbryt
当我看到我的Apache日志other_vhosts_access.log ,我看到许多尝试,从每月几个不同的IP这样的: www.example.com:80 91.200.xx – – [25/Jun/2017:17:20:19 +0200] "POST /wp-login.php HTTP/1.1" www.example.com:80 91.200.xx – – [25/Jun/2017:17:20:19 +0200] "POST /wp-login.php HTTP/1.1" www.example.com:80 91.200.xx – – [25/Jun/2017:17:20:20 +0200] "POST /wp-login.php HTTP/1.1" 这似乎是暴力攻击。 有一个简单的方法来自动禁止 (与高速公路没有链接) 这些攻击者? 如果我使用Wordpress插件,stream量仍然会进入PHP,浪费资源等。 如果我在Apache层面这样做,肯定会浪费资源 我应该尽可能做到最低水平吗? 即IP表? 有没有一个工具,在other_vhosts_access.log中查找这样的攻击者,并自动禁止他们在iptables ?
我有一个安装了LAMP的Amazon EC2实例。 我编辑了/etc/apache2/sites-available/000-deault.conf并添加了这个: <VirtualHost *:80> ServerAlias * UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon CustomLog /var/log/apache2/access.log vcommon VirtualDocumentRoot /var/www/vhosts/%0 </VirtualHost> Listen 443 <VirtualHost *:443> ServerAlias * UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon CustomLog /var/log/apache2/access.log vcommon VirtualDocumentRoot /var/www/vhosts/%0 </VirtualHost> 当我访问我的域名时,他们指向正确的目录,除了一件事情之外,所有的工作都很好…当我使用www访问域名时。 它给出了这个错误: “未find 在此服务器上找不到请求的URL /。 我的目录结构是/var/www/vhosts/domain.com没有www。 […]
目前我在Apache / 2.4.23版本,我在我的networking服务器上运行多个虚拟主机站点在ELB后面。 我的ELB下有4个实例,每个都有8GB的内存。 在这些Web服务器上,我看不到在我的httpd.conf文件中设置的任何mpm指令,因为我可以在httpd-mpm.conf文件(位于/usr/share/doc/httpd24-2.4)中看到mpm模块指令的默认值0.23)。 我的networking服务器正在使用prefork mpm模块 httpd -V | grep MPM Server MPM: prefork 目前,所有4个networking服务器只剩下大约200MB的剩余空间,而且我发现总共有大约60个httpd进程正在运行。 以下是指标 [root@ip ~]# ps -ef | grep httpd | wc -l 58 [root@ip ~]# ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}' Apache Memory […]
我需要拒绝某个特定国家/地区的网站访问,但允许通过.htaccess身份validation绕过 我发现这个网站https://www.ip2location.com/blockvisitorsbycountry.aspx 在那里我可以下载一个.htaccess拒绝来自特定国家的访问,但我不知道是否有可能增加继续用户/密码的能力 <Limit GET HEAD POST> order allow,deny allow from all deny from 123.456.789.0/255 </Limit> 将其放在根文件夹中也会拒绝访问该国以外的Google机器人?
是否有可能重写/代理一个URL到另一个具有不同path的URL? 它不应该只是一个redirect,而应该是其他URL的内部代理,以便浏览器地址栏只显示原始URL。 请注意,这两个url的域名/主机名称会有所不同。 请build议。 eg Rewrite or Proxy from, https://www.example1.com/a/b to https://www.example2.com/p/q/r
基本上,我主持一个静态的HTML网站,我需要: http://example.com/some-direcory/index.html 被redirect到: http://example.com/some-direcory 虽然仍然有物理文件代表的内容存储在: http://example.com/some-direcory/index.html 这是我有: # rewrite /dir/file to /dir/file/index.html RewriteRule ^([\w\/-]+)(\?.*)?$ $1/index.html$2 [L,T=application/x-httpd-html] 这似乎对我上面的#2需求很好,然后我有这个满足我对#1的需求: # rewrite /dir/file/index.html to /dir/file RewriteRule ^(.*)/index\.html$ /$1 [R=301,L,C] 但是,当我将这两个规则结合在一起时,他们显然会创build一个redirect循环 有什么办法可以解决吗?