我在我的网站elixnews.com上使用以下代码从以下位置删除php扩展: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^\.]+)$ $1.php [NC,L] 要从我的链接中删除www和php扩展,但它不起作用: http : //elixnews.com/todays_news – 怎么了?
环境 Ubuntu 12.10 Apache 2.2.22 背景 我正在使用基于名称的虚拟主机。 在设置过程中,我添加了一个端口5001到虚拟主机列表,并成功地通过这个端口访问了这个网站。 我后来从虚拟主机列表中删除了这个,并且select了基于ServerAlias指令访问站点并使用相同的端口。 该列performance在看起来像这样: <VirtualHost *:80> ServerAdmin webmaster@example1 DocumentRoot /home/example1/public_html Servername example1.org ServerAlias *.example1.org ServerAlias example1.org </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@example2 DocumentRoot /home/example2/public_html ServerName example2.com ServerAlias *.example2.com ServerAlias example2.com </VirtualHost> 问题 尽pipe从虚拟主机列表中删除端口5001并重新启动Apache多次,但访问www.example2.com网站会导致redirect到www.example2.com:5001。 我想让Apache知道哪个根文件夹只能基于ServerAlias。 但是,似乎Apache正在保存这个端口,并将URLredirect到相同的URL加端口5001。 我已经尝试清除我的客户端上的caching,我已经尝试从不同的设备访问这个网站,所有的都有相同的结果。 题 Apache会保存以前的虚拟主机configuration的原因是什么? 有没有可以在Apache中清除caching?
我试图在apache2后面安装jenkins(全新安装包pipe理器)使用的操作系统:ubuntu 12.04 LTS 其实我在这个Apache背后设置了一些服务。 首先是artifactory。 在这里我的网站文件 <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/var/www" ServerName aDomain.com ErrorLog "/path/to/artifactoryVirtualHost.log" ProxyRequests off ProxyPass /artifactory http://127.0.0.1:8081/artifactory ProxyPassReverse /artifactory http://127.0.0.1:8081/artifactory ProxyPreserveHost on </VirtualHost> 它是按照预期的工作,当我去aDomain.com/artifactory它redirect到artifactoryembedded式tomcat。 这是我的jenkins网站文件 <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/var/www" ServerName aDomain.com ErrorLog "/path/to/jenkinsVirtualHost.log" ProxyRequests off ProxyPass /jenkins ajp://127.0.0.1:8102/jenkins ProxyPassReverse /jenkins ajp://127.0.0.1:8102/jenkins ProxyPreserveHost on </VirtualHost> 注意这里的区别我在这里使用AJP连接器,因为jenkins允许它没有太多的configuration。 另外jenkins在我的/ etc / default […]
我运行了一堆服务器,一些运行Ubuntu 12.04,一些运行Centos 6.3。 最近,我的ldap服务器上的自签名SSL证书过期了,于是我生成了一个新证书,并将其分发到所有需要连接到ldap服务器以运行身份validation的Apache2服务器。 在Ubuntu上运行的所有Apache 2服务器都正常工作,放入新的证书,一切都很开心。 然而,在Centos上,新的证书仍然没有成功。 如果我切换到使用未encryption的LDAP,他们再次工作。 我已经做了大量的研究,并且发现了这些描述我的情况的东西: https://issues.apache.org/bugzilla/show_bug.cgi?id=50630 无法弄清楚为什么apache LDAPauthentication失败 不幸的是,我已经尝试添加“LDAPVerifyServerCertclosures”我的configuration,这并没有帮助。 任何其他build议,将不胜感激。 编辑1:我已经做了一些更多的挖掘,我发现了很多谈论最近的Centos ldap包正在build立反对NSS而不是OpenSSL,和套pipe问题。 一个例子: http : //www.openldap.org/lists/openldap-technical/201303/msg00162.html 那么,meta-question有没有人跑过这条路来解决SSL相关的问题呢? 它成功了吗?
我们在CentOs 6.4上运行Apache和CherryPy(Python)服务器。 昨天Apache服务器突然下降,而使用8080端口的CherryPy正常工作。 我们正在努力解决这个问题,但没有运气。 似乎最大的同时连接有什么问题,但是我们不知道如何解决这个问题,甚至不能解决真正的问题。 错误日志文件有这样的东西: [Sun Aug 04 04:47:16 2013] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Mon Aug 05 21:57:31 2013] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Mon Aug 05 21:58:46 2013] [error] server reached MaxClients […]
我想找出一个重写规则丢弃端口81.我使用no-ip,所以请求命中端口81,然后我有一个重写规则redirect到SSL。 现在看起来像https://example.com:81 ,我得到一个SSL错误。 有没有办法在sslredirect后丢弃:81?
我有一个通过路由器连接到互联网的计算机子网(也可能是一个HTTP代理)。 我的目标是更改一个URL的URL参数。 如果用户访问http://www.google.com/或访问http://www.google.com/?hl=zh-CN ,则两种情况下都应该看到http://www.google.com/的内容。 HL = FR 是否有可能在Apacheconfiguration中使用URL重写? 还有哪些方法可以成为实现这一目标的最简单的方法? 更新: google.com只是一个例子,事实并非如此。
我试图找出一种方法来实时看到人们下载文件,以确保从该人下载是成功的。 我似乎无法find我需要的searchstring。 任何帮助表示赞赏! 我有一些我创build的bash脚本,用于实时监控我的HTTPlogin,Mail,SSH和其他一些事情以及端口连接和负载。
我有一个启用了modsecurity的网站,但是当我试图通过网站访问服务器上的PDF文档时,我收到了403 Forbidden 。 有没有办法将PDF文件白名单允许通过网站或可能的configuration选项被提供? –9a349c55-A– [14/Aug/2013:10:05:57 –0400] UguOxX8AAQEAAD22d8AAAACN 192.168.1.108 52929 192.168.1.125 80 –9a349c55-B– GET /pdf/sample.pdf HTTP/1.1 Host: www.example.com Connection: keep-alive User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 Accept: */* Referer: http://www.example.com/pdf/sample.pdf Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Cookie: __utma=143856170.1892623529.1376158518.1376158518.1376158518.1; __utmz=143856170.1376158518.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=1.834637782.1376487927.1376487927.1376487927.1; __utmb=1.4.10.1376487927; __utmc=1; __utmz=1.1376487927.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) Range: bytes=0-32767 –9a349c55-F– HTTP/1.1 403 Forbidden […]
我在我的httpd.conf中为IE设置了以下设置: BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 我想将这个应用到我的服务器上的所有请求。 处理keep alive的httpd.conf部分如下所示: # # Timeout: The number of seconds before receives and sends time out. # Timeout 5 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive Off # # MaxKeepAliveRequests: The […]