我想让人们从指定的IP访问我的网页。 不过,我在Cloudflare后面。 获取用户IP的唯一方法是从X-Forwarded-For标头。 但我不能相信X-Forwarded-For ,因为人们可以绕过Cloudflare并直接访问我的服务器IP(假设他们可以幸运地猜测我的服务器IP)。 所以,我想允许来自Cloudflare的特定X-Forwarded-For IP列表。 我知道Cloudflare的IP列表 。 这是我到目前为止。 这样对吗? SetEnvIF X-Forwarded-For "xxxx" AllowIP <RequireAny> <RequireAll> <RequireAny> Require ip 199.27.128.0/21 Require ip 173.245.48.0/20 Require ip 103.21.244.0/22 Require ip 103.22.200.0/22 Require ip 103.31.4.0/22 Require ip 141.101.64.0/18 Require ip 108.162.192.0/18 Require ip 190.93.240.0/20 Require ip 188.114.96.0/20 Require ip 197.234.240.0/22 Require ip 198.41.128.0/17 Require ip 162.158.0.0/15 Require […]
我想升级我的本地服务器到PHP 7.1。 当我试图做到这一切的时候,除了openssl之外,一切都会好的。 随着PHP <= 5.30 openssl工作完美,但如果我切换到PHP 7.1 openssl被禁用。 我认为每个设置都可以(http.conf,php.ini),因为相同的设置适用于其他的PHP版本。 用PHP 7.1我得到这样的味精: 无法find包装“HTTPS” – 你忘了启用它时,你configurationPHP 我试图复制libeay32.dll,ssleay32.dll,openssl.exe在windows文件夹和apache / bin文件夹我试图添加php dir到windowspath我试过每种可能的方式,我已阅读各种页面,但没有任何改变。 有人能帮我吗?
我在curl中使用各种调用时经常看到这一点。 我不知道是否它的根本原因,我的一些返回导致错误400,但作为一个新手只是好奇的东西比任何东西。
Oracle Linux 7 x64上的Apache 2.4.27。 我可以正确调用https://example.com/cgi-bin/helloworld.cgi 。 简单的Perl脚本返回“Hello,world via cgi-bin!” 我可以在https://example.com/helloworld.html正确调用静态内容 简单的HTML文件返回“Hello,world via html!” 我可以使用RewriteRule : RewriteRule "^/test" "/helloworld.html" 我看到“Hello,world via html!” 但是,我不能使用RewriteRule: RewriteRule "^/test" "/cgi-bin/helloworld.cgi" 这会导致400错误的请求。 那我怎么直接打电话呢? 如何在进入/cgi-bin时使我的RewriteRule工作? 这似乎是我的问题。 我尝试添加[L]和[L,PT]但没有任何帮助。
在Apache mod_php和php-fpm的nginx上有很多旧的基准 但是,在2.4版本中,Apache可以使用php-fpm。 有没有比mod_php和php-fpm(都在Apache 2.4.x上)更明智的基准?
在我们的Amazon EC2实例中,我卸载了PHP5.3( yum remove php )并安装了PHP 5.5,它也捆绑在Apache 2.4( yum install php54 )中。 出于某种原因,我的php.ini文件不再被读取。 它看起来像它可能会被弃用,也许我应该使用/etc/php-5.5.ini而不是 – 但也没有被阅读! (奇怪的是,我找不到任何文档。谷歌search“php-5.5.ini”(带引号)返回没有帮助的结果! 运行php –ini ,我得到这个: [ec2-user@ip ~]$ php –ini Configuration File (php.ini) Path: /etc/php-5.5.d Loaded Configuration File: /etc/php-5.5.d/php.ini Scan for additional .ini files in: /etc/php-5.5.d Additional .ini files parsed: /etc/php-5.5.d/apc.ini, /etc/php-5.5.d/bz2.ini, /etc/php-5.5.d/calendar.ini, /etc/php-5.5.d/ctype.ini, /etc/php-5.5.d/curl.ini, /etc/php-5.5.d/dom.ini, /etc/php-5.5.d/exif.ini, /etc/php-5.5.d/fileinfo.ini, /etc/php-5.5.d/ftp.ini, /etc/php-5.5.d/gd.ini, /etc/php-5.5.d/gettext.ini, […]
以下是从Apache网站获取的示例服务器状态页面: Current Time: Thursday, 01-May-2014 07:38:59 UTC Restart Time: Friday, 11-Apr-2014 18:30:33 UTC Parent Server Config. Generation: 27 Parent Server MPM Generation: 26 Server uptime: 19 days 13 hours 8 minutes 26 seconds Server load: 4.90 5.10 5.39 Total accesses: 200912024 – Total Traffic: 24965.1 GB CPU Usage: u5133.55 s2390.16 cu0 cs0 – .445% CPU […]
我已经在我的一个域上设置了auth设置,但我想禁用它作为反向代理。 <VirtualHost *:80> ServerName example.org DocumentRoot /var/www/ <Directory /var/www/> BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On AuthType Digest AuthName "Internal" AuthDigestDomain http://example.org/ AuthDigestProvider file AuthUserFile /etc/apache2/example.digest Require valid-user Options FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ExpiresActive On ExpiresDefault "access plus 7 days" ProxyRequests Off ProxyPreserveHost On ProxyPass /api/ http://api.otherdomain.com/ retry=0 nocanon ProxyPassReverse /api/ http://api.otherdomain.com/ AllowEncodedSlashes […]
我已经在Ubuntu / Apache 14.04服务器上安装了ModEvasive。 国防部工作正常,并阻止DDOS攻击。 但它不会触发任何电子邮件。 我在.conf文件中正确地提到了DOSEmailNotify。 此外,日志文件只显示一个PID。 可能是什么问题?
在Ubuntu 14.04中设置一个新的Web服务器,并试图为PHP生成的文件争夺文件权限。 默认情况下, /var/www中的所有目录和文件都拥有/分组到www-admin。 目录权限是rwxrwsr-x ,文件权限是rw-rw-r– 。 然后,我们将有限数量的目录组设置为www-data – 这样PHP(通过Apache)就可以在这个位置写入日志和caching文件。 但是,我不能让PHP服从0002的umask,所以PHP生成的文件只能写入www-data用户。 这是一个问题,因为我们使用持续集成和其他一些清理过程。 到目前为止,我有: 在/etc/pam.d/common-session中将umask设置为0002 在/etc/pam.d/common-session-noninteractive中将umask设置为0002 在/etc/profile中将umask设置为0002 在/etc/apache2/envvars中将umask设置为0002 在/etc/login.defs中将umask设置为0002 在/etc/passwd使用sudo chfn -o "umask=002" daemon_username 而我仍然卡住。 我已经停止/启动服务,甚至重新启动电脑 – 没有喜悦。