部分.htaccess文件在某些页面上强制https (例如,当用户login时,input信用卡信息等),同时在所有其他页面上强制http 。 这似乎是我需要的理想设置。 但是,我的网站的其中一个分机负责生成信用卡处理表单。 在表单的动作url中,它包含了web根目录的https url(例如https://domain.com/ )。 但是,web根目录不是.htaccess强制https页面之一,因此它强制redirect到http 。 正因为如此,该扩展失败,因为该表单正试图提交到一个httpsredirect到http 。 我该怎么办? 我不希望用户在不需要时查看受保护的页面; 我宁愿他们收获caching的好处。 显然,在受保护的页面上,他们需要提交到安全的URL(我的网站的CMS显然是这样工作的,所有表单提交到web根目录工作得很好)。 我无法告诉扩展程序提交到不同的URL。 以下是我的.htaccess的相关部分: <IfModule mod_rewrite.c> RewriteEngine On # Define default protocol for all assets RewriteRule ^ – [E=protocol:http,E=ssl:%{HTTPS}off] # Define HTTPS targets, add more cond as required RewriteCond $1 (payment|sign-in|sign-up) [NC] RewriteRule (.*) – [E=protocol:https,E=ssl:%{HTTPS}on] # Rewrite host if necessary […]
我有Apache(2.2)服务器与以下configuration反向代理到应用程序运行在8080端口上的tomcat(6)。 …. ServerName ext-domain ProxyPreserveHost On ProxyPass /myapp http://int-domain:8080/myapp ProxyPassReverse /myapp http://int-domain:8080/myapp …. 当我从浏览器访问URL下面 "http://ext-domain/myapp" 我在浏览器地址栏中获取下面的URLreplace。 "http://ext-domain:8080/myapp" 和Apache访问日志说… "GET /myapp HTTP/1.1" 302 421 "-" "Mozilla/5.0"… 如何避免在端口8080插入响应URL? 有人可以帮助吗? 谢谢。
我有两个站点需要不同的域,但都必须使用运行Apache httpd的同一台服务器,并使用SSL。 这是一个例子: www.example.com传统应用程序接收高stream量 beta.example.com新网站具有向后不兼容的url结构更改 每个域都有不同的文档根path。 SNI不是一种select,但我有* .example.com的通配符SSL证书。 分配第二个IP不是一个选项。 如何将Apacheconfiguration为使用端口443上的任何通信的通配符SSL证书,然后在SSL握手之后继续使用基于名称的虚拟主机? 在nginx中,它可能是一个基于域名的if-block,并且具有SSL之外的configuration。 有没有相当于Apache 2.2的工作? 编辑: SNI不是由我的客户请求的选项,由于减less浏览器支持相比,替代。 我正在寻找一些方法来使用旧标准来提供证书,然后像在端口80上应用一样,在ssl端口上应用经典的VHost定义。
我正在尝试创build一个keytab文件。 我看到一个警告 WARNING: pType and account type do not match. This might cause problems. 我使用的命令是 ktpass -princ HTTP/[email protected] -mapuser [email protected] -crypto rc4-hmac-nt -pass **** -ptype KRB5_NT_SRV_HST -out "C:\Documents and Settings\Administrator\bloodhound.kytab" 我想用这个在Apache上的SSO。 我正在windows server 2003 r2 sp2上创build这个 产量 Targeting domain controller: fezziwig.uk.domain.com Using legacy password setting method Successfully mapped HTTP/bloodhound.domain.com to ldaplookup. WARNING: pType and account […]
在Solaris上的Intranet系统中,我们目前使用perls Apache2 :: AuthenNTLM模块来与Win 2k3 doman服务器进行身份validation,因此我们可以访问浏览该站点的用户的用户ID。 转移到赢得2012 AD服务器,我们被告知这不会支持NTLM,微软现在不build议这么做。 是mod- auth-为这个软件的用例遏制一个合适的替代品吗? 我search谷歌,找不到相关的文章或教程显示mod-auth-curb被用于这种方式。 我很难入门,并可以在正确的方向使用一个点。 谢谢
当以用户ec2-user身份运行以下脚本时,出现iptables v1.4.18: can't initialize iptables table filter: Permission denied (you must be root)错误消息iptables v1.4.18: can't initialize iptables table filter: Permission denied (you must be root) 脚本: #!/bin/sh # Offending IP as detected by mod_evasive # Add the following firewall rule (block IP) $IPTABLES -I INPUT -s $IP -j DROP 我怎样才能运行iptables作为一个非root用户来阻止一个IP地址? 注意:这个脚本通常由mod_evasive调用
我正在pipe理一个RHEL 6.6服务器,我从pipe理员那里inheritance了公司不再有联系。 我需要replaceSSL证书,为此需要一些关于物理组织的信息: $ openssl req -new -newkey rsa:2048 -nodes -sha256 -keyout example.com.key -out example.com.csr Generating a 2048 bit RSA private key ……….+++ …………………………………………………+++ writing new private key to 'example.com.key' —– You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is […]
谷歌浏览器将在以下情况下开始警告用户他们的SSL连接不安全 : 该证书使用SHA1哈希algorithm, 和 证书在2016-01-01 (或不同来源2017-01-01)或之后到期 因此,我正在尝试编写一个方法来确定证书是否受到影响。 下面是我维护的另一台服务器上的SHA1证书示例,该证书在“安全”时间范围内到期: $ curl -v –silent https://example.com/ 2>&1 | grep "expire\|SSL connection using" * SSL connection using DHE-RSA-AES256-GCM-SHA384 * expire date: 2015-07-20 00:00:00 GMT 我怎么能确定这个证书是来自stringDHE-RSA-AES256-GCM-SHA384 SHA1? 256中的string使它看起来像是使用256位algorithm,即使我知道这不是因为我自己用$ openssl req -new -newkey rsa:2048 -nodes做了证书请求。 Googlesearch我发现这个资源或支持密码,但我不知道如何才能确定该文件的密码强度。 我怎么能通过curl来确定密码的强度,以便我可以编写它?
尝试访问www.website.com/server-status时出现Forbidden错误 mod_status已启用 虚拟主机: <VirtualHost *:8080> ServerName website.com ServerAlias www.website.com DocumentRoot /var/www/wordpress/ DirectoryIndex index.php <Directory /var/www/wordpress/> AllowOverride All Order Deny,Allow Allow from all Options +Indexes </Directory> <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from .website.com </Location> ErrorLog /var/www/wordpress/logs/error.log CustomLog /var/www/wordpress/logs/access.log combined </VirtualHost> 我试图将允许从.website.com更改为网站IP,并发生同样的问题。 当我尝试将其更改为允许从所有我得到一个404。 我做的另一个尝试是设置允许从127.0.0.1和通过lynx从服务器内访问,几乎相同的问题。 这是error.log中收到的错误: [error] [client 127.0.0.1] client denied by server […]
我用mod_php构build了一个运行Apache 的图像 ,用于Magento扩展开发。 Magento需要写入webroot:它将文件保存在/srv/magento/var/用于caching,错误报告和其他一些function。 这个图片上的webroot是一个docker卷,Apache不能以root身份运行,所以它不能写入文件系统,所以Magento失败了。 我不能实际chown或chmod在容器内的目录可靠。 我不想使用Docker Volume Container,因为开发者应该可以直接访问Magento webroot中的文件。 我不会特别介意在容器中以root身份运行Apache,但apachectl确实似乎介意。 给Docker容器中的Apache用户写入对卷的访问权的合适方式是什么? 考虑这个例子: $ cd $(mktemp -dt$(date +%s)) $ docker run -d -p 80:80 -v "$PWD:/srv/magento" kojiromike/magento_apache $ cat > index.php <<PHP <?php file_put_contents('foo', 'bar'); PHP $ wget -SO/dev/null http://$(boot2docker ip 2>/dev/null)/index.php –2014-12-15 13:33:59– http://192.168.59.103/index.php Connecting to 192.168.59.103:80… connected. HTTP request sent, awaiting response… HTTP/1.1 […]