Articles of apache 2.2

不完整的“文件不存在”Apache错误信息

我有以下问题。 给定https://<servername>/apple/ empty目录。 如果我引用https://<servername>/apple/plum.html ,则看到此错误出现在ssl_error_log中: [Wed Apr 18 15:13:25 2012] [error] [client …] File does not exist: <DocumentRoot>/apple/plum.html 到目前为止这么好,但如果我指的是https://<servername>/apple/peach/plum.html (一个不存在的桃目录中的文件),那么我得到: [Wed Apr 18 15:13:25 2012] [error] [client …] File does not exist: <DocumentRoot>/apple/peach 我想在错误日志中看到完整的文件名。 httpd.conf中的ErrorLogFormat指令尚未设置,因此使用默认值。 无论如何,%M参数(包含文件名)将以完整的forms添加实际的日志消息。 我该怎么办? 我在SUSE Linux Enterprise Server 10(x86_64)修补程序级别3上使用Apache 2.2.3。 注意:原来的问题涉及Java类加载,但我认为上面的例子是更具描述性的。

运行Nginx(与Apache)和cPanel / WHM

我想知道是否将cPanel / WHM作为控制面板使用Nginx作为web服务器(在端口80上)和Apache作为反向代理(在端口8080上)是一个好主意? 我也安装了Nginx Admin,所以NginX的configuration由WHMpipe理。 我问的原因是因为我遇到了一篇文章( http://kbeezie.com/view/apache-with-nginx/ ),它解释了如何将Apache设置为反向代理,但是它声明 如果您使用的是基于控制面板的主机,例如cpanel / whm,则不build议使用此方法。 在这种情况下,大多数服务器configuration会自动处理,而手动更改可能会导致问题(另外在大多数情况下,控制面板制造商或托pipe服务提供商不会获得支持)。 任何人有任何过去的经验,可以说,如果它的好/坏主意?

redirect未find页面

在Apache中, 我如何redirect未find的页面? Not Found The requested URL /dsadsa was not found on this server.

AllowOverride在/ var / www /中导致性能不佳

我已经在文章中看到,为了安全起见,最好设置“ AllowOverride None for / ” “AllowOverride None for / var / www /” ,并且基于此我已经将configuration更改为以下内容。是的,如果我们设置“ Allowoverride All for / var / www / “,那么index.html apache的请求会在/.htaccess /www/.htaccess等内部查找.htaccess。这会降低性能,为此我设置” Allowoverride None for / “和” Allowoverride All为/ var / www / “ ** DocumentRoot / var / www <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all […]

如何为连接到具有Xampp或其他Web服务器应用程序的调制解调器的两台PC制作联合Localhost?

我有两台连接到同一个调制解调器的个人电脑,我想为他们两个做一个联合localhost。 例如,我有一个由xampp制作的pc1上的本地主机,并有一个phpmyadmin和“htdocs”文件夹,包括数据库和文件。 现在我们要join他们,所以如果我们去pc2上的本地主机,它显示为pc1相同,他们有共同的数据库。 所以如果我们从pc2更改数据库,更改可以在pc1上看到.. 更重要的部分是常见的phpmyadmin(数据库),如果有可能的话,第二优先级的普通文件。

清漆3.0.2和ISPConfig 3.0.4

我遵循的教程完美服务器 – Ubuntu 11.10 [ISPConfig 3]在这里。 我正在Rackspace上运行带有1024 RAM的Ubuntu 11.04(Natty Narwhal)服务器。 我已经完成并更新到ISPConfig 3.0.4。 当我决定尝试安装清漆时,一切都一直很好。 起初,我通过发布以下方式安装了Varnish: apt-get update apt-get upgrade apt-get install varnish 显然,安装的版本是Varnish 2.x,所以我回去添加了由varnish-cache.org提供的软件包的存储库 curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add – echo "deb http://repo.varnish-cache.org/ubuntu/ lucid varnish-3.0" >> /etc/apt/sources.list apt-get update apt-get install varnish 这更新了我的Varnish版本到3.0.2 然后我进行了以下更改: vim /etc/default/varnish change DAEMON_OPTS to port 80: vim /etc/apache2/ports.conf NameVirtualHost *:8000 Listen […]

在多个站点上更新相同的.htaccess文件

我pipe理8个共享主机帐户的400多个WordPress的博客,我正在寻找一种简单的方式来分发更改某些文件。 特别是,我想推出相同的.htaccess文件到每个博客的根目录,这限制了访问http://domain.com/wp-admin/文件夹到指定的IP地址列表。 另一种方法是通过某种types的http:// include来提取规则。 这可能在.htaccess中? 或者,也许我正在做这一切都是错误的。 你会build议什么?

Apache服务器CGI错误500

我试图为GIT的“cgit”web-ui设置一个服务器。 我已经从开发人员的网站下载了源代码,并按照说明正确编译了它。 我的default-server.conf如下所示: # # Global configuration that will be applicable for all virtual hosts, unless # deleted here, or overriden elswhere. # DocumentRoot "/srv/www/htdocs/cgit" # # Configure the DocumentRoot # <Directory "/srv/www/htdocs"> # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews […]

.htaccess RewriteRule适用于addon域,但不适用于root域

我在一个插件域中创build了一个.htaccess,它成功隐藏了wp-admin文件夹: # Hide wp-admin <ifModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} !MagicString RewriteRule ^wp-admin/.*$ – [R=404,L] </ifModule> 现在我想把它移到根域的.htaccess,这样它就隐藏了所有插件域上的所有wp-admin文件夹。 但是,尽我所能,这是行不通的。 我究竟做错了什么?

redirect永久和https

我刚刚在我的服务器上设置了https,并且遇到redirect永久性问题。 如果我有一个链接例如http://domain.com/index.html它redirect我 https://www.domain.comindex.html /缺less,我不知道如何解决它。 它与http://www.domain.com/index.html一起工作 这是我的httpd.conf <VirtualHost *:80> ServerName domain.com Redirect permanent / https://www.domain.com/ </VirtualHost> <VirtualHost *:80> ServerName www.domain.com Redirect permanent / https://www.domain.com/ </VirtualHost> <VirtualHost *:443> DocumentRoot /var/www/domain/ ServerName www.domain.com SSLEngine on SSLCertificateFile ssl.crt SSLCertificateKeyFile ssl.key </VirtualHost>