Articles of apache2

syn在80端口的洪水攻击

在过去的两天里,我面临着syn flood攻击,并继续得到以下消息: 10月27日00:52:58 server2内核:[1356.539680]端口80上可能的SYN洪泛。发送cookie。 10月27日00:53:58 server2内核:[1416.545865]端口80上可能的SYN洪泛。发送cookie。 10月27 00:54:58 server2内核:[1476.546692]端口80上可能的SYN洪泛。发送cookie。 10月27日00:55:58 server2内核:[1536.547742]端口80上可能的SYN洪泛。发送cookie。 10月27日00:56:58 server2内核:[1596.549753]端口80上可能的SYN洪泛。发送cookie。 这时候网站没有加载。 我在CentOS Linux上,我已经尝试了以下内容: sysctl -w net.ipv4.tcp_syncookies=1 echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle

主域的redirect正在被子域触发

我有我的服务器上configuration的域redirect到我的网站的HTTPS版本的所有请求都工作正常。 几天前,我添加了一个现在被redirect到主域的子域。 这里是Apache的configuration文件。 httpd.conf(系统生成,不由我编辑) <VirtualHost my.ip:80> ServerName bwdmedia.net ServerAlias bestwebsitedesigners.in bestwebsitedesigners.net bwdmedia.co bwdmedia.org www.bestwebsitedesigners.in www.bestwebsitedesigners.net www.bwdmedia.co www.$ DocumentRoot /home/bwdmedia/public_html ServerAdmin [email protected] UseCanonicalName Off CustomLog /usr/local/apache/domlogs/bwdmedia.net combined CustomLog /usr/local/apache/domlogs/bwdmedia.net-bytes_log "%{%s}t %I .\n%{%s}t %O ." ## User bwdmedia # Needed for Cpanel::ApacheConf UserDir enabled bwdmedia <IfModule mod_suphp.c> suPHP_UserGroup bwdmedia bwdmedia </IfModule> <IfModule !mod_disable_suexec.c> <IfModule !mod_ruid2.c> SuexecUserGroup bwdmedia […]

在Windows Server 2008 R2上WINNT Apache MPM“ThreadsPerChild”configuration

我得到错误,无法启动Apache时,我将我的ThreadPerChild设置为200,虽然我仍然有60%的可用RAM。 服务器是Windows Server 2008 R2,带有4GB RAM。 如何在这种情况下使用更多的RAM到Apache? 我的Apache MPMconfiguration: # WinNT MPM # ThreadsPerChild: constant number of worker threads in the server process # MaxRequestsPerChild: maximum number of requests a server process serves # Win32DisableAcceptEx: Use accept() rather than AcceptEx() to accept network connections <IfModule mpm_winnt_module> ThreadStackSize 8388608 ThreadsPerChild 170 MaxRequestsPerChild 0 #Win32DisableAcceptEx </IfModule> 我在apache的error_log中得到了什么: […]

httpstream量显示与https上的stream量不同的目录

我在ubuntu 14.04上运行apache2,并使用Let's Encrypt设置了SSL。 在我的域名之一(域名A)它工作正常。 我可以达到它 http://domainA.com http://www.domainA.com 要么 https://domainA.com https://www.domainA.com 但是,我有附加的域指向框,并为每个这样的虚拟服务器设置。 我以同样的方式设置domainA( 如果您想知道如何使用,请参阅本教程 ) 在我的其他网域上,通过https的stream量显示了正确的虚拟内容 – 但是通过http的stream量只显示了根目录(所以默认的index.html出现)。 在/ etc / apache2 /网站,可用我有以下几点: 000-default.conf default-ssl.conf domainA.com.conf domainA.com-le-ssl.conf domainB.com.conf domainB.com-le-ssl.conf 它们的设置完全相同,只是相关的信息发生了变化。 domainA .conf如下所示: <VirtualHost *:80> ServerAdmin [email protected] ServerName domainA.com ServerAlias www.domainA.com DocumentRoot /var/www/html/domainA/public_html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> domainB.conf看起来完全相同,除了用“domainB”代替domainA。 domainA.com-le-ssl.conf文件看起来几乎完全相同,除了包括所有合适的SSL文件并且在端口443上(当我使用Let's Encrypt创build文件时,它是dynamic生成的 – 我没有碰到它们) 所以domainB.conf看起来像这样: <VirtualHost *:80 […]

Apache AH00526:错误日志不允许在这里

默认情况下,Apache使用apache2.conf中的这个指令来防止访问.htaccess和.htpasswd文件 <FilesMatch "^\.ht"> Require all denied </FilesMatch> 对任何匹配文件的任何请求都将在错误日志中生成一行 authz_core:error AH01630: client denied by server configuration: /.html 我只是想把这些types的错误放在一个单独的日志文件中,但是Apache不接受这个指令: <FilesMatch "^\.ht"> ErrorLog ${APACHE_LOG_DIR}/separate.log Require all denied </FilesMatch> AH00526:此处不允许使用语法错误ErrorLog 那么,为了在一个单独的文件上logging这些请求,正确的语法是什么?

PHP警告:file upload错误 – 无法在第0行中的未知中创build临时文件

我的ubuntu vps的php在运行php5的时候上传的图片很好,但升级到php5.6后,我的vps上的所有网站都不再上传图片了。 PHP Warning: File upload error – unable to create a temporary file in Unknown on line 0, 可能是什么问题,我该如何解决?

Nginx的proxy_set_header不能用于Apache GEOIP

我正在使用Nginx的反向代理到apache2使用以下教程 。 然后,我尝试使用本教程将geoip安装到Nginx 反向代理完美地工作了一段时间,直到我试图安装geoip数据库,所以我可以在PHP上获得国家代码。 我有以下的nginxconfiguration为教程指示。 location ~ \.php$ { # location / { #fastcgi_pass unix:/run/php/php7.0-fpm.sock; #include snippets/fastcgi-php.conf; proxy_pass http://1.2.3.4:8080$request_uri; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header GEOIP_COUNTRY_CODE $geoip_country_code; proxy_set_header GEOIP_COUNTRY_CODE3 $geoip_country_code3; proxy_set_header GEOIP_COUNTRY_NAME $geoip_country_name; proxy_set_header GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code; proxy_set_header GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3; proxy_set_header GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name; proxy_set_header GEOIP_REGION $geoip_region; proxy_set_header GEOIP_CITY $geoip_city; […]

如何使example.com/about显示example.com/about.html? (Apache2的)

尝试使用example.com/about show example.com/about.html,而不必将url更改为/about.html时,最佳select是什么? 现在我正在尝试下面的代码,它只是返回一个404错误。 RewriteRule ^/about$ https://example.com/about.html [R=301,L] 编辑#1 W3DK我目前有多视图启用,但我仍然得到一个404错误。 这是我当前在VirtualHost中的当前设置 <Directory /var/www/public_html> Options All +MultiViews AllowOverride All Order allow,deny allow from all </Directory>

如何将SFTP / SSH访问权限授予外部开发人员并将其监控到public_html?

我发现了非常类似的问题( 像这样 ),但我找不到适用于我的情况的解决scheme。 我需要让外部开发人员访问机器上的一个托pipe网站。 目录结构是这样的: apache apache 4096 Jan 23 16:13 /var/www/website-alpha.com/public_html apache apache 4096 Aug 7 21:22 /var/www/website-omega.com/public_html 新用户只能从上面的列表中访问(编辑,创build和删除文件)第二个目录。 他一定不能看到上面的东西。 另外,我应该可以通过terminal或SFTP客户端(FileZilla,Transmit等等)login。 服务器上有httpd CentOS 7。 任何提示? 我真的花了数小时search

与proxypass错误的Apachestream量redirect

请帮我使用Apache 2.4.18。 这是与这个问题作斗争的第三天。 build筑 www.myserver.com:用于stream量redirect的前台服务器 内部服务器与本地IP 192.168.0.10包含2个文件夹与一个Web应用程序每一个 192.168.0.10/app01 192.168.0.10/app02 我想通过他们的子域来访问这些networking应用程序 app01.myserver.com和 app02.myserver.com 这是我的虚拟主机configuration文件 <VirtualHost *:80> ServerName app01.myserver.com ProxyRequests Off ProxyPreserveHost On ProxyPass / http://192.168.0.10/app01 ProxyPassReverse / http://192.168.0.10/app01 </VirtualHost> 它的工作,但部分:stream量正在redirect,但我有问题的链接。 问题 在app01.myserver.com上login后,浏览器redirect到app01.myserver.com/dashboard ,应用程序菜单上的某些链接选项会redirect到它们各自的模块,但是: 当我点击app01.myserver.com/profile时,我被redirect到app01.myserver.com/profile 然后我被redirect到app01.myserver.com/app01/profile 它正确地给了我一个404错误,因为“ app01 / profile ”不存在。 我想我需要一个重写规则,或者ProxyPass和ProxyPassReverse是不正确的。 任何帮助,将不胜感激。