我正在尝试将http://example.com/ *redirect到http://example.com/,但每次我都会有一个redirect循环。 什么是不正确的呢? 这两个(或任何其他正则expression式的组合)都不起作用: RedirectMatch temp ^/.+$ http://example.com RedirectMatch temp ^/.+$ http://example.com/ 这总是匹配,并且正在创buildredirect循环。
我试图启用Apache 2.2.15和5.3.3的输出压缩,但由PHP生成的网页不压缩:( 我的deflate.conf: [user@host conf.d]# cat deflate.conf <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE application/x-httpd-php AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript DeflateCompressionLevel 9 # Browser specific settings BrowserMatch […]
遵循这里的安装说明,我完成了AWS实例上的整个过程。 一切似乎都设置正确,我甚至可以使用下面的开发服务器运行BH: tracd ./bloodhound/environments/main –port=8000 一旦我尝试切换到使用Apache和mod_wsgi虽然,假定的url是没有为我提供任何东西。 此外,我在access.log或error.log中都没有收到任何错误 – 这使得这非常困难。 我跟着他们的方向到T,我用于WSGIDaemonProcess的用户只是标准的AWS用户,Ubuntu 不知道我错了哪里,我所知道的是我可以使用tracd工作。 这是我的/sites-available/bloodhound文件: <VirtualHost *:8080> WSGIDaemonProcess bh_tracker user=ubuntu python-path=/home/bloodhound/lib/python2.7/site-packages WSGIScriptAlias /bloodhound /home/apache-bloodhound-0.7/installer/bloodhound/site/cgi-bin/trac.wsgi <Directory /home/apache-bloodhound-0.7/installer/bloodhound/site/cgi-bin> WSGIProcessGroup bh_tracker WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> <LocationMatch "/bloodhound/[^/]+/login"> AuthType Digest AuthName "Bloodhound" AuthDigestDomain /bloodhound AuthUserFile /home/apache-bloodhound-0.7/installer/bloodhound/environments/main/bloodhound.htdigest Require valid-user </LocationMatch> </VirtualHost> 除了PostgreSQL以外,其他任何东西都不需要configuration,这很简单,而且我知道正在工作,因为如果没有它,开发服务器将无法工作。 我还设置了AWS安全组,以允许这些端口上的stream量。 很高兴给更多的信息
我有两个自己托pipe的公共Web服务器。 一个是我的活网站,另一个是一个缩小的网站,我也用它来重新路由stream量,当我有我的生活网站在维护。 我的防火墙是云托pipe的防火墙。 我现在做事情的方式是,当我想要将现场网站下载并重新路由到备份站点时,我向云端托pipe的防火墙人员发送请求,并为我执行切换。 整个过程大概需要10-15分钟。 而当我想回到现场。 我发另外一个请求,再等10-15分钟。 问题是,来回切换是一个不错的30分钟! 我希望能够立即做到这一切! 我怎么能这样做呢。 如果主Web服务器closures,所有的stream量都会进入备份的Web服务器,反之亦然? 或者如果有一种方法可以在两台服务器之间切换?
甚至更短版本的.htaccess文件(Last RewriteCond不存在)用于在我的共享虚拟主机上完美工作,但我已经转移到与Ubuntu 12的VPS与它的股票Apache2,但它根本不会工作(甚至与我的变化),我不明白为什么。 我可以访问example.com或example.com/news,但不能访问example.com/article/4 我把mod_rewrite块从.htaccess到vhostconfiguration,反之亦然,但似乎没有工作。 我猜它实际上试图去到文章的子目录或东西(这不存在如此404),但我不知道如何阻止它做到这一点。 我正在使用Apache版本2.2.22 我的虚拟主机文件 <VirtualHost 127.0.0.1:80> DocumentRoot /home/example/www/example.com RewriteLogLevel 3 RewriteLog /home/example/www/example.rewrite.log <Directory "/home/example/www/example.com"> AllowOverride All Options -ExecCGI +FollowSymLinks -Indexes -MultiViews Order deny,allow allow from all <IfModule mod_rewrite.c> RewriteEngine On RewriteOptions inherit </IfModule> </Directory> AccessFileName .htaccess ServerSignature Off ServerName example.com ErrorLog /home/example/www/example.log LogLevel warn </VirtualHost> 我的.htaccess文件 ErrorDocument 404 /index.php?404 ErrorDocument 403 […]
我已经看到了围绕这个话题的所有其他问题,但没有一个答案已经奏效。 情况:VPS上1 IP,debian wheezy 7用apache2运行。 即使是简单的虚拟主机也不能正常工作,如在网站启用的“www.domain.net”中所述: <VirtualHost *:80> ServerName domain.net ServerAlias www.domain.net DocumentRoot /var/www/domain </VirtualHost> apache2ctl -S的输出: VirtualHost configuration: xx.xx.xxx.xxx:443 is a NameVirtualHost default server xx.domain1.net (/etc/apache2/conf.d/owncloud5-ssl.conf:1) port 443 namevhost xx.domain1.net (/etc/apache2/conf.d/owncloud5-ssl.conf:1) xx.xx.xxx.xxx:80 oc.domain1.net (/etc/apache2/sites-enabled/oc.domain.net:8) wildcard NameVirtualHosts and _default_ servers: *:80 is a NameVirtualHost default server domain1.net (/etc/apache2/sites-enabled/000-default:8) port 80 namevhost domain1.net (/etc/apache2/sites-enabled/000-default:8) port 80 […]
我们刚刚在我们的服务器上安装了APC,查看APC的统计数据后,看起来APC的caching需要大约5-10分钟才能填满,然后完全清空。 当前设置包括: apc.shm_segments 1 apc.shm_size 256M apc.ttl 1800 apc.user_ttl 1800 服务器有16GB的RAM,运行〜40个虚拟主机。 我的主要疑问是: 大概,shm_size的值应该设置为? 1 – 2GB安全吗? 还是完全取决于在服务器上运行的应用程序? 我读过ttl会删除'expired'caching文件,那么将ttl设置为低于caching填充所需的时间是个好主意? 设置多个共享内存段是否有优势?
(为了简单起见,我将Apache服务器的IP改为1.1.1.1,将Gollum服务器改为6.6.6.6) 我试图通过Apache服务于Gollum wiki,因为它已经正确设置了SSL,而且我目前只在testingGollum wiki。 所以我把Apache设置为ProxyPass(config下面)。 问题是机架服务器似乎工作正常,当我直接从我的代理机器通过curl访问它: 1.1.1.1 – – [05/Dec/2013 06:20:25] "GET /docs/Home HTTP/1.1" 200 6467 0.2135 但是每当我尝试使用我的浏览器时,我都会得到一个404。 Rackup说: 6.6.6.6 – – [05/Dec/2013 06:20:00] "GET /docs/Home HTTP/1.1" 404 – 0.0006 荒谬的是,当我使用与我的浏览器通过代理服务器(1.1.1.1)的telnet发送(如下所示)完全相同的标题时,请求成功: 6.6.6.6 – – [05/Dec/2013 06:19:19] "GET /docs/Home HTTP/1.1" 200 6467 0.2759 我不知道我在做什么错,为什么(以及如何?!)机架区分来自同一台机器的两个不同的请求。 请帮助? (在ruby 1.9.2p320,RHEL 6上,在RHEL 5和Rack 1.2(Release:1.5)上使用Apache / 2.2.15) 编辑显然,这是WEBrick的问题,因为当我切换到薄它的工作。 还是会喜欢你的见解… Apacheconfiguration: <VirtualHost […]
我已经在CentOS 6.4盒子上设置了mod_proxy,mod_proxy_html(3.1.3)和mod_xml2enc的反向代理。 代理服务器很好地服务于目标服务器,但是它会乱码非ASCII字符(在我的情况下是'äöüéàè')。 我已经search了所有的地图试图find一个解决scheme,但无济于事。 编码在响应头中正确指定,与目标服务器(utf-8)相同。 我也试过通过以下方式设置xml2enc使用的编码: xml2EncDefault utf-8 但没有效果。 我正在使用代理configuration设置的虚拟主机运行代理,如下所示: ProxyRequests off ProxyHTMLLinks a href ProxyHTMLLinks area href ProxyHTMLLinks link href ProxyHTMLLinks img src longdesc usemap ProxyHTMLLinks object classid codebase data usemap ProxyHTMLLinks q cite ProxyHTMLLinks blockquote cite ProxyHTMLLinks ins cite ProxyHTMLLinks del cite ProxyHTMLLinks form action ProxyHTMLLinks input src usemap ProxyHTMLLinks head profile ProxyHTMLLinks […]
所以我一直试图使用apache的基准性能,但我很难理解为什么我得到这些结果。 仅供参考,它是一个使用Zend Framework,mySQL数据库的PHP应用程序,大多数是默认的httpd.conf设置。 如果我对1个并发用户和10个请求进行简单的testing,似乎只需要10个并发用户和10个请求就可以运行,就像它一次只运行一个请求一样。 我使用“top”来监视CPU和RAM的使用情况,并发级别为10,它徘徊在50%左右,RAM没有交换,我仍然有大约400MB的空闲空间。 我也检查了httpd.conf文件,max客户端是默认的256。 -c 1 -n 10 Concurrency Level: 1 Time taken for tests: 11.594 seconds Complete requests: 10 Failed requests: 0 Write errors: 0 Keep-Alive requests: 0 Total transferred: 738770 bytes HTML transferred: 735680 bytes Requests per second: 0.86 [#/sec] (mean) Time per request: 1159.353 [ms] (mean) Time per request: 1159.353 […]