我有这个configuration SSLCipherSuite AES128+EECDH:AES128+EDH SSLProtocol All -SSLv2 -SSLv3 为Apache 2.4.6,OpenSLL 1.0.2a 并在SSLLab的SSLtest我得到A, 它build议(警告)我有以下密码启用: TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e) DH 1024 bits (p: 128, g: 1, Ys: 128) FS WEAK 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (0x67) DH 1024 bits (p: 128, g: 1, Ys: 128) FS WEAK 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x33) DH 1024 bits (p: 128, g: 1, Ys: 128) FS WEAK 128 我怎样才能禁用它们? […]
我有一个简单的Apache虚拟主机: <VirtualHost *:80> ServerName hello.local ProxyPass / http://localhost:8810/ ProxyPassReverse / http://localhost:8810/ </VirtualHost> 所有对hello.local的请求都被代理到http://localhost:8810/ 。 我想要做的是向http://localhost:8810/的http请求中添加一个头部,并使用由外部命令返回的值。 就像是 Header set MyHeader ${/usr/bin/an_external_program} 任何方式来完成这个?
我必须说,我不是那个build立服务器的人,而是一个可怜的人,他们的任务是找出当前正在发生的事情。 我只有一个关于Apache和Linux的粗略知识,所以请忍受我… 问题 我们的apache服务器closures(主要在夜间),并且无法恢复并重新开始备份,没有任何人告诉它。 从我可以收集的,这里有趣的事情是在Apache错误日志中的以下行; [Wed Apr 15 03:43:02.114879 2015] [mpm_prefork:notice] [pid 25778] AH00171: Graceful restart requested, doing restart 之后是一个非常长的堆栈跟踪,这里是前几行: *** Error in `/usr/sbin/httpd': free(): invalid pointer: 0x00007f581d5c13c0 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7d19d)[0x7f583b69519d] /etc/httpd/modules/libphp5.so(php_module_shutdown+0x2b)[0x7f58301d255b] /etc/httpd/modules/libphp5.so(php_module_shutdown_wrapper+0x9)[0x7f58301d2619] […] 回溯持续了一段时间,但有趣的是,在这之间, Error in /usr/sbin/httpd […]重复了5次,直到最后一条消息是 [Wed Apr 15 03:43:02.269626 2015] [core:notice] [pid 25778] AH00060: seg fault or similar nasty […]
自上次Fusion Passenger更新以来,我所有的Sinatra应用程序都停止了以下env的工作:Apache(2.4.17),Phusion Passenger(5.0.21)。 在更新乘客中间件之前,一切都按预期工作。 问题是,当我请求虚拟主机的url( https://myapp.ch )时,apache目录正在尝试进入公共目录的列表。 ODD部分:如果请求Sinatra控制器中定义的路由(即: https : //myapp.ch/infos ),则启动乘客并按预期提供请求的页面。 这是虚拟主机部分: <VirtualHost *:443> DocumentRoot /home/user1/sinatra/app1/public ServerName myapp.ch <Directory /home/user1/sinatra/app1/public> AllowOverride all Order allow,deny Allow from all Options -MultiViews Require all granted </Directory> Config.ru # encoding: UTF-8 require 'rubygems' require 'sinatra' require File.expand_path '../start.rb', __FILE__ run Sinatra::Application 请求Sinatra应用程序的根(/)时,Apache日志错误: [Mon Oct 26 22:10:30.728795 2015] [autoindex:error] […]
我希望Apache在特定的接口上监听链路本地ipv6地址。 我有我的httpd.conf中的以下行: Listen [fe80::a00:16ff:fe89:420f]:80 这是基于这里的Apache文档: https : //httpd.apache.org/docs/2.4/bind.html “IPv6地址必须括在方括号” 我的操作系统/ Apache版本详细信息如下: $ httpd -v Server version: Apache/2.4.18 (Unix) Server built: Dec 14 2015 08:05:54 $ uname -rv 4.3.3-3-ARCH #1 SMP PREEMPT Wed Jan 20 08:12:23 CET 2016 使用journalctl -e显示的结果是: (22)无效参数:AH00072:make_sock:无法绑定到地址[fe80 ….. IPv6正在工作,因为我有sshd和dnsmasq监听。 我已经尝试追加两个不同的作用域ID后缀到地址。 您可以在ping6和sshd使用接口标识3或名称net1作为scopeid。 $ ip addr | grep -Po "^\d: \S+" 1: lo: 2: […]
我正在尝试以下 RewriteMap lookup "txt:D:/lookup.txt" RewriteCond %{REQUEST_URI} ^/${lookup} RewriteRule ^/(.*)/(.*)$ /a/$1/b/$2.html [PT,L] 我试图比较请求path是否与有效path开始或不。 我在查找文件中有很长的path列表。 请帮忙。
我试图密码保护文档根,我得到的是一个“内部服务器错误”页面。 Apache错误日志显示: Invalid command 'AuthType', perhaps misspelled or defined by a module not included in the server configuration 任何重写条目之前我的.htaccess文件: AuthType Basic AuthName "Restricted Access" AuthBasicProvider file AuthUserFile /var/www/public/.htpasswd Require user dean 我检查了模块是否启用: Array ( [0] => core [1] => mod_so [2] => mod_watchdog [3] => http_core [4] => mod_log_config [5] => mod_logio [6] => mod_version […]
我已经从namecheap.com购买了SSL证书。 我正试图在运行Ubuntu 14.04和Apache的服务器上安装它。 我使用以下教程来设置Apache https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts 。 服务器具有仅在HTTP上运行的预先存在的站点。 该网站使用两个子域名admin.example.com和api.example.com,所以我购买了通配符证书。 我已经根据证书颁发机构安装了证书,并修改了Apache config example.com.conf来添加SSL虚拟主机,我仍然希望非HTTPS页面能够正常工作,所以我离开了现有的80端口configuration,并添加了新的虚拟主机主机configuration如下。 我重新启动Apache并尝试通过https查看页面,但从Firefox获取以下错误代码(Error code: ssl_error_rx_record_too_long) 我已经尝试了这个post中提到的修复,但没有成功https://www.digicert.com/ssl-support/apache-fix-common-ssl-errors.htm#SSLRecordLength 我也检查了防火墙已经打开了端口443。 Apacheconfiguration <VirtualHost *:80> ServerAdmin [email protected] ServerName example.com ServerAlias www.example.com api.example.com admin.example.com DocumentRoot /var/www/example.com/public/ <Directory "/var/www/example.com/public/"> Options Indexes FollowSymLinks AllowOverride None Order deny,allow Allow from all Satisfy all IndexIgnore */* RewriteEngine on # if a directory or a file exists, […]
有没有办法让Apache Web服务器从内存中显示它的当前运行configuration,即不是通过parsingconfiguration目录中的文件? 我刚刚设法意外覆盖了服务器上的虚拟主机configuration(是的,我知道应该有一个备份!),而我可以很容易地重build它(非常新的服务器,这么简单的configuration,因此没有备份但是 – 这是明天的任务),想知道是否有任何方法让Apache显示其实时运行的configuration,而不仅仅是parsing文件(如httpd -S似乎这样做)。 尝试谷歌search和在这里searchServerFault,但没有发现任何东西。 我可以想象,随着时间的推移,这可能会节省一些人的培根。 🙂
我在我的.htaccess文件中设置了一个Content-Security-Policy头,它已经变成了一个非常长的单行,这是一个麻烦的pipe理。 有没有办法把这一行分解成更易于pipe理的子string? 作为一个微不足道的例子,说我正在设置一个标题 Header set Content-Security-Policy "deafult-src http://domainA.com; script-src http://domainB.com" 我可以(没有明显的突破问题)用类似的东西来完成我的具体情况 Header append Content-Security-Policy "default-src http://domainA.com;" Header append Content-Security-Policy "script-src http://domainB.com" 但是会在string中插入逗号,所以我仍然好奇是否有更好的答案可以普遍应用,而不需要在响应中添加额外的字符。 如果有一些连接字符可以用来将string拆分成更小的部分,那么理想的是什么 Header set Content-Security-Policy "default-src http://domainA.com;" \" script-src http://domainB.com" 要么 Header set Content-Security-Policy "default-src http://domainA.com;"^ " script-src http://domainB.com" 要么 Header set Content-Security-Policy "default-src http://domainA.com;" +" script-src http://domainB.com" 另外,如果我可以设置某种variables,只是倾倒他们的内容做类似的事情 a="default-src http://domainA.com;" b=" script-src http://domainB.com" […]