Articles of apache 2.4

PCI合规性Apache版本

我们正在使用当前版本的Apache 2.4。 6在Centos 7回购中可用。 装有yum。 我们正在处理PCI合规性,报告说: IP Address: x Host: x Path: THREAT REFERENCE Summary: vulnerable Apache version: 2.4.6 Risk: High (3) Port: 443/tcp Protocol: tcp Threat ID: web_server_apache_version Details: Apache HTTP Server mod_proxy_fcgi Response Handling Vulnerability 11/21/14 CVE 2014-3583 Apache HTTP Server before 2.4.11 is prone to a vulnerability, which can be exploited to […]

Munin不在Ubuntu中创buildhtml文件

我使用Apache 2.4.7在Ubuntu Server 14.04中安装了Munin 但是,在完成所有configuration之后,Munin不会在html目录中创buildhtml文件。 这是我的文件: munin.conf dbdir /var/lib/munin htmldir /var/www/www/munin logdir /var/log/munin rundir /var/run/munin # Where to look for the HTML templates # tmpldir /etc/munin/templates [MuninMaster] address 127.0.0.1 use_node_name yes 和我的apache.conf Alias /munin /var/www/www/munin <Directory /var/www/www/munin> #Order allow,deny #Allow from localhost 127.0.0.0/8 ::1 #Options None Require all granted Options FollowSymLinks SymLinksIfOwnerMatch # This file […]

Win7的apache2.4.9 phpmyadmin4.5.0.2 – 一个不连接局域网

一切工作正常 – 托pipe几个我自己的网站,但希望能够维护他们在局域网上的其他电脑。 工作正常,除了phpmyadmin 。 一切都设置得可以做到。 在其他PC上,我得到了一个403错误(访问被拒绝 – 而Apache的日志告诉我这是由服务器configuration引起的)。 我必须使用PC的名称,使用localhost ,实际的IP,或127.0.01给出一个服务器不能在浏览器中find – 但这可以,因为我只想从局域网访问 – 而不是从互联网。 在\wamp\alias\phpmyadmin.conf我有: Alias /phpmyadmin "Q:/wamp/apps/phpMyAdmin4.5.0.2/" \# to give access to phpmyadmin from outside \# replace the lines \# \# Require local \# \# by \# \# Require all granted \# <Directory "Q:/wamp/apps/phpMyAdmin4.5.0.2/"> Options Indexes FollowSymLinks MultiViews AllowOverride all <IfDefine APACHE24> Require […]

Nginx的proxy_pass到Apache

我有一个用nginx作为反向代理的raspberrypi,另一台机器是nginx(用于owncloud)和apache(phpbb)。 redirect到nginx的作品,但不是redirect到Apache,而是redirect到owncloud。 我认为出于某种原因apache不“响应”的nginx代理,所以nginx代理使用第一个虚拟主机的字母顺序,而不是这个防火墙的问题,我用nmap检查端口也我可以直接访问Apache local_ip:8080,它的工作。 – nginx代理的虚拟主机: owncloud: http ://pastebin.com/G6Q6fiKz phpbb: http : //pastebin.com/Keb5t4gt – apache:phpbb vhost: <VirtualHost *:8080> #ServerName forum.spooky4672.me DocumentRoot /var/www/phpbb ErrorLog ${APACHE_LOG_DIR}/forum_error.log CustomLog ${APACHE_LOG_DIR}/forum_access.log combined </VirtualHost>

GitLabredirect与Apache

我正努力在RHEL 7上用Apache 2.4configurationGitLab 8。 到目前为止,我有两个选项都不令人满意:或者我使用下面的Apacheconfiguration文件,让GitLab工作顺利,但其他所有应用程序都无法访问: <VirtualHost *:80> ServerName server_name DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ ProxyPassReverse / http://localhost:8081/ <Location /> Require all granted </Location> # Custom log file locations ErrorLog /var/log/httpd/gitlab_error.log CustomLog /var/log/httpd/gitlab_access.log combined </VirtualHost> 或者我尝试以下,其他一切正常,我可以访问GitLablogin页面(通过http://server_name/gitlab/users/sign_in ),但是它会尝试连接到http://server_name/[stuff] ,没有/gitlab : <VirtualHost *:80> ServerName server_name DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public ProxyPass /gitlab http://localhost:8080/ ProxyPassReverse /gitlab http://localhost:8080/ ProxyPassReverse /gitlab […]

htaccess – 根据请求来源redirect

请帮我在这里。 我想使用.htaccess根据请求来源redirect,例如: 用户请求: http://www.domain.com/subfolder/ 并应该redirect到: http://www.domain.com/ 这是非常简单的完成,但在网页上有一个链接: http://www.domain.com/subfolder/ 当请求来自该链接时,它应该工作。 换句话说,我的目标是强制所有用户通过其他url之前的主页,即使他们知道的网页url(书签或其他),这是一个有效的。 可能吗?

虚拟主机允许编码的斜杠

我试图让我的本地电脑编码的斜杠。 但我不知道如何configuration虚拟主机。 这是我的configuration Apache版本:2.4.9(Win64) PHP版本:5.5.12 我试过这个,但它不工作: <VirtualHost *:80> ServerName localhost DocumentRoot localhost/Myapp/ AllowEncodedSlashes On </VirtualHost>

Apache VirtualHost部分被忽略

我正在Windows上运行一个本地服务器,并且只要定义了一个variables,我就想为它的特定部分提供局域网访问。 它工作正常,除了主configuration服务,而不是虚拟主机。 我特意将虚拟主机指向了一个带有错误的DirectoryIndex的禁止目录,以确保它实际上可以正常工作,但无论我做什么,页面始终都能正确服务。 这是虚拟主机: <VirtualHost ${LANIP}:${PORT}> DocumentRoot ${SRVROOT}/htdocs/phpinfo ServerName ${LANIP}:${PORT} DirectoryIndex index.pl </VirtualHost> 这里是完整的httpd.conf ,没有评论。 当我使用httpd -DLANACCESS -S ,这是输出: c:\fauna\apache\bin>httpd -DLANACCESS -S VirtualHost configuration: 192.168.1.6:80 192.168.1.6 (C:/fauna/apache/conf/httpd.conf:464) ServerRoot: "c:/fauna/apache" Main DocumentRoot: "C:/fauna/apache/htdocs" Main ErrorLog: "c:/fauna/apache/logs/error.log" Mutex rewrite-map: using_defaults Mutex lua-ivm-shm: using_defaults Mutex default: dir="C:/fauna/apache/logs/" mechanism=default PidFile: "c:/fauna/apache/logs/httpd.pid" Define: LANACCESS Define: DUMP_VHOSTS Define: DUMP_RUN_CFG Define: FAUNAROOT=/fauna […]

Apache 2.4在首次响应之前有很长的延迟

我用Apache 2.4在本地networking中testing服务器(Centos 7)。 所有的工作正常,但每次约1小时后,无效阿帕奇回应滞后约4.8秒。 接下来的请求非常快(1-5毫秒)。 连接后出现延迟(连接 – 1ms,请求发送 – 1ms,等待TTFB – 4.8s)。 无论请求的源(HTML页面,HTML + PHP或只是图像)types的问题发生。 另一个networking应用程序工作无瓦特。 IPv6禁用。 在httpd.conf中configuration的IP和端口: ServerRoot "/etc/httpd" Listen 192.168.0.100:80 KeepAlive On MaxKeepAliveRequests 0 KeepAliveTimeout 300 Include conf.modules.d/*.conf User apache Group apache ServerAdmin root@localhost ServerName 192.168.0.100:80 <Directory /> Options Indexes FollowSymLinks AllowOverride all Require all granted </Directory> DocumentRoot "/Site" <Directory "/Site/www"> AllowOverride None […]

CloudFront CDN由于Apache的DirectorySlash行为而中断

我的CDN域设置为www.mysite.com ,它从origin.mysite.com读取。 mod_dir是在apache上启用的,所以任何没有结尾斜线的请求都会被301redirect到等效的URL,并带有斜线。 问题是,当有人去www.mysite.com/somepage我希望他们redirect到www.mysite.com/somepage/ ,但阿帕奇发出包括域名的redirect,所以从Apache发出的redirect实际上是origin.mysite.com/somepage/ ,用户现在结束在origin.mysite.com域,CDN的整个点现在丢失了。 我尝试了DirectorySlash off但导致许多其他问题。 我能想到的解决scheme是redirect问题的相对URL,我无法弄清楚,如果这是可行的。