Articles of 虚拟主机

“服务器应该是SSL感知的,但没有configuration证书”错误

在最近将Apache2升级到版本2.2.31之后,我在SSL VirtualHost安装程序中发现了一个奇怪的行为。 我正在托pipe的一些网站显示了默认主机的证书,即使客户端是“ Server Name Identification ,也只有其中的一些。 这显示为常见的Firefox / Chrome的护照 – 警告如果您正在浏览您的家庭银行业务,您可能会被诈骗,但事实并非如此。 要清楚的是,如果服务器host.hostingdomain.org有自己的SSL,试图访问https://www.hostedsite.org报告host.hostingdomain.org证书,但一些https://www.hostedsite.me报告正确的证书。 所有站点都托pipe在相同的IP地址上,端口443.事实是VirtualHosting在HTTP端工作,并自动将SNI感知的客户端redirect到SSL,因此它向后兼容SNI-unaware客户端。 检查有问题的VirtualHosts的错误日志显示以下文本 [Tue Dec 25 16:02:45 2012] [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/path/to/www.site.org.conf:20) 事实上,虚拟主机已经正确configuration了SSLCertificateFile。 问题很明显:如何解决这个问题?

浮动IP和虚拟IP之间有什么区别?

这可能是一个行人问题,但“浮动IP”地址和“虚拟IP”地址有什么区别? 他们是同义词吗?

即使VirtualHost具有“AllowOverride All”,.htaccess也会被忽略

我在Fedora 13上运行LAMP服务器,工作正常。 不过,我刚刚添加一个“.htaccess”文件到我当前站点的docroot文件夹被完全忽略。 我已经尝试了六种不同的testing,包括这一个: RewriteEngine on RewriteBase / RewriteRule ^.*$ index.php 但图像和所有其他网页加载罚款,而不存在的文件仍然404。我也试过这个: order deny,allow deny from all 但每页仍然加载正常。 .htaccess文件再次被100%忽略。 我们把我们的虚拟主机logging放在/etc/httpd/conf.d/virtual.conf中。 它看起来像这样: NameVirtualHost * <VirtualHost *> ServerName intranet DocumentRoot /var/www/default <Directory "/var/www/default"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *> ServerName ourwebsite.com DocumentRoot /var/www/html/ourwebsite.com/docroot <Directory "/var/www/html/ourwebsite.com/docroot"> Options FollowSymLinks AllowOverride All Order […]

closures一个虚拟主机的错误和访问日志

如果我不在虚拟主机中设置错误日志,它将默认为默认的错误/访问日志。 有一种方法可以closures一个虚拟主机?

防止默认服务器的最佳方法?

我有一些虚拟主机,我想“closures”默认的虚拟主机,无论是空白页面,错误页面,或者一般来说最有效的使用Nginx的资源,而只允许其他虚拟主机通过访问预定义的域。

只有浏览器支持SNI才能redirect到SSL

我有Apache 2.2与mod_ssl和HTTPS在与VirtualHosting相同的IP /端口的一堆网站,所以客户端必须支持SNI连接到这些虚拟主机。 我想用以下方式configuration我的服务器: 当用户键入www.dummysite.com并且他的浏览器支持 SNI(服务器名称指示)时,任何HTTP请求都被redirect到发送HSTS报头的地址https:// 。 但是,如果浏览器不支持 SNI,那么请求将由HTTP服务。 上述规则说明,对于那些仍然运行旧浏览器的用户来说实际上是一个后备规则,因为Mozilla和Chrome浏览器没有这个问题,只是为了避免这些用户离开网站。 我想在Apacheconfiguration级别redirect,也许在用户代理上使用filter。 我不想接触正在运行的应用程序,除非确保不存在直接的http://引用(否则它们意味着安全警告) [编辑](编辑问题时,我忘了问题):什么是启用SNI的用户代理redirect的列表?

在VirtualHost上下文中的_default _:*和*:*之间的区别

我想知道VirtualHost上下文中的“ default :*”和“*:*”之间的区别。 <VirtualHost _default_:*> #… ServerName host.example.com #… </VirtualHost> <VirtualHost *:*> #… ServerName host.example.com #… </VirtualHost> 我不知道使用的差异和porpouse。 THK

在同一个VirtualHost上服务http(端口80)和https(端口443)

我需要在Apache上设置我的VirtualHost服务于http和https(使用标准端口) 如果我启用SSL引擎(如下所示) – 在端口80上出现错误。 原因是,部分站点需要SSL,但其他部分则不需要。 我怎么能在网站上同时服务http + https? 这是我的虚拟主机文件…. NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost ServerName mysite.co.uk DocumentRoot /var/www/mysite/public <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/mysite/public> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from […]

我怎样才能看到每个Apache虚拟主机使用多less带宽?

我已经build立了Apache服务几个虚拟主机,我想看看每个站点使用多less带宽。 我可以看到整个服务器使用了多less,但是我想要更详细的报告。 我发现的大部分事情都是为了限制虚拟主机的带宽,但我不想这么做。 我只想看看哪些网站正在使用多less带宽。 这不是用于计费的目的,仅供参考。 有我应该使用的apache模块? 还是有其他的方法来做到这一点?

一个我从来没有听说过的域名parsing到我的网站

我发现(通过查看mod_pagespeedcaching条目),我从来没有听说过一个完全随机的域名解决我的网站。 如果我访问这个域,我的网站加载。 该域的DNS指向我的服务器的IP。 现在在我的虚拟主机configuration我有*:80,我猜是我要去哪里错了。 我立即将其更改为example.com:80,其中example.com是我的域名。 假设这意味着服务器只响应和完成对我的域名的请求,而不是端口80上的任何请求。 我原来的虚拟主机configuration; <VirtualHost *:80> DocumentRoot "/var/www/example.com" <Directory "/var/www/example.com"> Order allow,deny Allow from all Allowoverride all </Directory> </VirtualHost> 我新的尝试configuration; Listen 80 ServerName example.com <VirtualHost example.com:80> DocumentRoot "/var/www/example.com" <Directory "/var/www/example.com"> Order allow,deny Allow from all Allowoverride all </Directory> </VirtualHost> 当我尝试重新启动Apache与新的configuration我得到了以下错误: * Restarting web server apache2 [Fri Mar 28 08:55:47.821904 2014] [core:error] [pid […]