我使用本指南在Apache/2.4.18上设置了mod_evasive : https : mod_evasive 我只将[email protected]更改为root@localhost 。 我第一次使用test.pl它工作,但每剩余时间它只显示HTTP/1.1 400 Bad Request 。 我不确定是否意外地改变了什么,但是这里是我的test.pl #!/usr/bin/perl # test.pl: small script to test mod_dosevasive's effectiveness use IO::Socket; use strict; for(0..100) { my($response); my($SOCKET) = new IO::Socket::INET( Proto => "tcp", PeerAddr=> "127.0.0.1:80"); if (! defined $SOCKET) { die $!; } print $SOCKET "GET /?$_ HTTP/1.0\n\n"; $response = <$SOCKET>; print […]
在我的Apacheconfiguration中,我有一个奇怪的情况。 我决定使用FastCGI和多个版本的PHP。 以下是我的configuration文件。 如果我检查phpinfo(); 我可以看到,在域localhost它是加载php.ini文件夹php56 。 还行吧。 我不明白,为什么在域localhost7它是加载php.ini文件夹php71 。 我不会为PHP7改变PHPRC ,但它正在加载不同的configuration文件。 这是如何工作,或为什么它是从不同的文件夹中加载php.ini? 如果我将PHPRC改为完全不同的文件夹,它也可以。 这是不是常量没有使用,或者是因为我在Windows(不同的行为)? <IfModule fcgid_module> FcgidInitialEnv PATH "C:/www/xampp/php5.6;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;" FcgidInitialEnv SystemRoot "C:/Windows" FcgidInitialEnv SystemDrive "C:" FcgidInitialEnv TEMP "C:/www/xampp/tmp" FcgidInitialEnv TMP "C:/www/xampp/tmp" FcgidInitialEnv windir "C:/WINDOWS" FcgidIOTimeout 64 FcgidConnectTimeout 16 FcgidMaxRequestsPerProcess 1000 FcgidMaxProcesses 3 FcgidMaxRequestLen 8131072 # Location php.ini: FcgidInitialEnv PHPRC "C:/www/xampp/php5.6/" FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000 <Files ~ […]
我对于设置SSL证书和一般的服务器是一个新手,所以在我试图解释我自己所处的情况时,请耐心等待。 我最近获得了将用于保护我的服务器的Comodo Essential SSL通配符许可证。 我configuration的服务器用于Kolab。 Kolab正在工作,但没有configurationSSL,所以我想我可能会设置。 我按照相应的Kolab howto-page( https://docs.kolab.org/howtos/secure-kolab-server.html )上提供的说明进行操作,但卡在设置cyrus-IMAP服务器的部分。 运行时: openssl s_client -showcerts -connect example.org:993 我得到以下输出(截断): CONNECTED(00000003) depth=0 OU = Domain Control Validated, OU = EssentialSSL Wildcard, CN = *.example.org verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 OU = Domain Control Validated, OU = EssentialSSL Wildcard, CN = *.example.org verify error:num=27:certificate […]
我试图configurationApache浏览器caching,但似乎没有工作的一半时间。 这是我的虚拟主机configuration: <IfModule mod_ssl.c> <VirtualHost *:443> ServerName example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/example ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/example> <IfModule mod_expires.c> <FilesMatch ".+\.(jpe?g|png|gif|js|css|woff|woff2|svg|eot|ttf)$"> ExpiresActive On ExpiresDefault "access plus 2 weeks" </FilesMatch> </IfModule> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> RewriteEngine on SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf </VirtualHost> </IfModule> 这是一个curltesting: […]
在单独的VLAN中使用DUAL NICconfiguration反向代理时,是通过apache完成的NIC之间的数据卸载,Solaris上的路由还是反向代理? 我正在build立一个Apache的反向代理,几乎确切的复制stream在下面的图中,我从类似的查询( https://askubuntu.com/questions/696781/two-nics-and-routing-between-the-interfaces ) 反向代理布局 反向代理是:Solaris 11 RP有一个带有域名/ DNS / SSL证书的外部NIC(eth0 – 192.168.1.10)。 连接到该地址成功检索RP盒上的数据(pre-RP设置。) RP还有一个连接到Web服务器(192.168.2.12)的内部NIC(eth1 – 192.168.2.10)。 eth0没有直接访问Web服务器,意图(networking分离)。 Web服务器有自己的SSL证书,并有一个入口点(端口443)到Web服务器。 无论我尝试什么,我都没有吞吐量到Web服务器。 我之前已经设置了一些反向代理,但通常只有一个NIC。 我目前的反向代理configuration如下所示: <VirtualHost *:443> ServerName xxx.xxx.xxx.xxx (Reverse Proxy IP) SSLEngine on SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off SSLProxyCheckPeerExpire off ProxyRequests off ProxyPreserveHost on SSLCertificateFile …/ssl/example.crt SSLCertificateKeyFile …ssl/example.key SSLCACertificateFile …ssl/example.crt ProxyPass / https://<WebAppServerIP>:443/ […]
我有一个VirtualHost中的下一个云(参见下面的configuration)。 当我只在Ubuntu 16.04的Apache上启用虚拟主机(nextcloud.conf)时,它可以工作。 但是当我启用000-default.conf和default-ssl.conf时,它会一直带我到主页而不是下一个页面。 我已经发布了所有的configuration文件。 我想得到默认的虚拟主机工作,因为我想抓住所有不匹配下一个云configuration的url。 nextcloud.conf <VirtualHost *:80> ServerName storage.declanmarks.pw RewriteEngine On RewriteCond %{HTTP_HOST} ^storage.declanmarks.pw RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] #RewriteRule ^(.*)$ https://storage.declanmarks.pw$1 [R,L] </VirtualHost> <VirtualHost *:443> Alias /files /var/www/files ServerName storage.declanmarks.pw DocumentRoot /var/www/nextcloud/ ServerAlias storage.declanmarks.pw <Directory /var/www/nextcloud/> Options +FollowSymlinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud </Directory> # […]
为什么我的SSL证书没有工作? 多个虚拟主机,其中几个是由通配证书覆盖的子域。 我试图让另一个域安全地运行在相同的IP上,并且为该域专门设置了不同的证书(即非通配符)。 但是,当我尝试通过https访问第二个站点时,我总是得到证书不匹配错误 ,浏览器告诉我它正在访问通配符证书。 我在我的一般Apache错误日志中看到这个: [Sun Aug 13 06:25:10.981964 2017] [ssl:warn] [pid 1826] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366) 所以我认为SNI是启用的(至less从我的理解)。 我可以确认find正确的DocumentRoot,网站加载等等,所以一般设置工作。 证书有效。 在Chrome 60.0.3112.90中testing。 WordPress,Apache 2.4.7,Rackspace负载均衡实例上的Ubuntu 14.04。 感谢您提供的任何帮助,我会提前为我的无知道歉。 这里是conf文件: 非通配符 <VirtualHost *:80> ServerName www.mySite.org ServerAlias mySite.org DocumentRoot /var/www/vhosts/www.mySite.org # Force HTTPS when […]
我在Magentopipe理员保存产品,但它提出了以下错误: 请求实体太大请求的资源/ admin / system_config / save / section / carriers / key / gs12323230599f2ce25da01b8b27cb596b06974f011331a /不允许请求POST请求数据,或者请求中提供的数据量超过容量限制。 我们有Apache和PHP的设置是: memory_limit = 768M post_max_size = 128M max_input_vars = 10000 任何想法什么设置来鼓捣?
这是我的另一篇文章的延续: 抓住所有VirtualHost不工作 。 我有虚拟主机的工作。 但是,我知道如何让它redirect一个自定义的错误页面,如404。 在我的VirtualHost中添加Redirect 404 / ,它将我带到默认的404页面。 但是,当我启用ErrorDocument 404 /errors/index.php我得到以下错误 Not Found The requested URL / was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 以下是我的configuration <VirtualHost *:80> DocumentRoot /var/www/main ServerName null Redirect 404 / ErrorDocument 404 /errors/index.php […]
我想打印mod_securityexception分数到Apache错误日志。 我使用setenv设置环境variables, %{name}e语法将其打印在日志中。 Modsecurityconfiguration: SecAction "id:90100,phase:5,pass, nolog, setenv:ModSecAnomalyScoreIn=%{tx.anomaly_score}, setenv:ModSecAnomalyScoreOut=%{TX.outbound_anomaly_score}" Apacheconfiguration: ErrorLogFormat "[…] [anomaly_score_in: %-{ModSecAnomalyScoreIn}e, anomaly_score_out: %-{ModSecAnomalyScoreOut}e ]" 但输出为空: […] [anomaly_score_in: -, anomaly_score_out: – ] 如果我添加SecAction "id:9990101,phase:5,pass, log, msg:'in: %{env.anomaly_score}, out: %{env.ModSecAnomalyScoreOut}' ,打印成绩,但在新的日志行。 我哪里做错了? ErrorLogFormat中的%{name}e是否等于%{VARNAME}e ?