Articles of 虚拟主机

HAProxy救援? (多台机器与虚拟主机)

这更多的是“最佳做法”或“投入赞赏”的问题。 目前我们pipe理大约5个运行Nginx PHP网站的Web服务器(在两个DC中)。 计划是重新devise设置,以便从pipe理的angular度来看更易于pipe理。 一个服务器在另一个networking中的DC中,其余的在单个机架中。 我们有时必须将客户端网站从一台服务器移动到另一台服务器,我们希望允许某些客户端的冗余等,所以代理似乎是一个好开始,任何速度的提高是非常受欢迎的,HAProxy似乎是一个很好的候选人都。 我们现在的想法是把HAProxy制作成一台机器,这样我们就可以在任何地方redirect任何东西,看起来很聪明,可以让机器像CARP一样进行故障转移。 任何见解/意见,高度赞赏。

VirtualHost问题

这是我的httpd.conf: <VirtualHost *> ServerName domain1.com DocumentRoot /home/www/domain1 </VirtualHost> <VirtualHost *> ServerName domain2.com DocumentRoot /home/www/domain2 </VirtualHost> 浏览器始终显示第一个条目时出现什么问题 – / home / www / domain1? 谢谢,Etam。

Apache:主站点和子站点的configuration

我想为我的托pipe设置一个特定的环境,但不知道什么是最好的方法。 我想要一个名为example.com的域名。 * The www. should contain the main website (hosting site) * every subdomain ex. customer1.example.com needs to be redirected to a subfolder 我不知道什么是最好的方法。 有虚拟主机为每个客户或有一个虚拟主机的服务和redirect使用mod_rewrite? 我目前正在设置这个环境,所以如果你有一个好主意plase不要忘记提及主机文件。 一切都应该自动生成,并在飞行中包括。 亲切的问候,病房

301redirect:domain.fr – > www.domain.com和www.domain.fr – > www.domain.com

我使用Passenger的Apache2服务器为我的Rails应用程序。 我不知道如何在我的VirtualHost中创build一个301redirect,如下所示: domain.fr – > www.domain.com www.domain.fr – > www.domain.com 我试过了 : Redirect 301 / http://www.domain.com/ 和 Redirect permanent / http://www.domain.com/ 但不是这样做的:-) Thx为您的答案..

如何configurationApache与mod_cache和mod_proxybalance大量虚拟主机

我有一个IIS服务器场,它提供类似于域停放站点,有数千个域分配给系统,并且dynamic地生成内容。 我需要一个负载平衡和caching解决scheme。 我的意图是使用Apache 2.2与mod_cache和mod_proxybalance来完成这一点。 我之前使用Apache的经验相当有限,通常只处理几个基于名称的虚拟主机。 我从来没有实现负载平衡或代理。 在研究一个configuration的同时,我还在摸索着一些基本的configuration指令,我不知道如何configuration这个环境。 尤其是,apache文档给出了关于不正确configurationServerName指令的可怕警告。 在这种情况下,我不知道如何处理这个。 该网站没有提供自己的内容,而是caching和代理内容。 我不能把每个域名放入独立的virutalhost指令。 在这种情况下,甚至需要ServerName(或其他似乎需要域名的指令)的指令吗? 编辑: 如果你想提出其他解决scheme,我向他们开放。 到目前为止,已经提出了ngnix,但ngnix不能代理基于名称的虚拟主机,因为它的代理代码只使用http 1.0到后端服务器。 我也不能确定它是否可以caching基于名称的虚拟主机。 清漆看起来像一个可能的caching解决scheme,但我真的很喜欢我可以托pipe在同一台服务器上,所以我不需要为每个function多个服务器。

无法让子域名与虚拟主机一起使用

好吧,所以我运行了一些虚拟主机的Apache 2,其中两个在同一个域上运行。 现在我的问题是,其中之一是假设运行在一个子域(dev.domain.com)和其他一切,但我不能得到这个工作。 我有两个站点可用的文件(dev.domain.com和domain.com),两个站点都启用了符号链接。 这是我在文件里面 dev.domain.com <VirtualHost *:80> ServerName dev.domain.com ServerAlias development.domain.com DocumentRoot /home/myusername/public_www/dev.domain.com <Directory /home/myusername/public_www/dev.domain.com/> 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 All Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, […]

托pipe和非托pipeVPS!

托pipe和非托pipeVPS之间的区别是什么? 哪个build议?

如何让Nginx的虚拟主机工作? (目前出现403 Forbidden错误)

我想在我的Ubuntu 10.04 32位Linode VPS上运行nginx。 sudo chown -R www-data:www-data /var/www sudo chmod -R 775 /var/www sudo add-apt-repository ppa:nginx/development sudo apt-get update sudo apt-get install nginx 制作一个nginx虚拟主机: mkdir -p /var/www/example.com/{public,logs} sudo nano /etc/nginx/sites-available/example.com 并写下如下 server { listen 80; server_name www.example.com; rewrite ^/(.*) http://example.com/$1 permanent; } server { listen 80; server_name example.com; access_log /var/www/example.com/logs/access.log; error_log /var/www/example.com/logs/error.log; location / […]

Mindtouch打破了我的Apache2虚拟主机configuration

我使用这里的说明安装了mindtouch,它似乎打破了我的虚拟主机configuration。 我有几个域运行相同的Apache实例,这是工作正常,但现在我所有的域名parsing到虚拟主机安装MindTouch。 所以mindtouch使我所有的域名指向新的mindtouch实例。 哎呀! 我使用debians默认的虚拟主机机制(网站启用等)。 有谁知道什么apache指令mindtouch是用来破坏我的vh设置? 我搜遍了所有的conf文件,在apache2.conf或httpd.conf中没有任何明显的会导致这种行为。 它是否创build了一个我应该销毁的sym-link? 我应该补充说我已经卸载了mindtouch软件包,但是apache仍然坚持把所有的域redirect到启用站点的文件夹中提到的第一个域。 thini:~# apache2ctl -S [Wed Jan 05 13:39:11 2011] [warn] NameVirtualHost *:80 has no VirtualHosts VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:* www.openancestry.org (/etc/apache2/sites-enabled/openancestry.org:1) *:* www.pragmantra.com (/etc/apache2/sites-enabled/pragmantra.com:1) *:* services.pragmantra.com (/etc/apache2/sites-enabled/services.pragmantra.com:1) *:* www.subversionreports.com (/etc/apache2/sites-enabled/subversionreports.com:1) *:* www.thijssen.ch (/etc/apache2/sites-enabled/thijssen.ch:1) Syntax OK 编辑:Niall&DerfKbuild议更正后,我现在得到这个: thini:/etc/apache2/sites-enabled# apache2ctl -S VirtualHost configuration: wildcard NameVirtualHosts […]

如何解决虚拟主机问题

我有多个网站都设置相同,除了“bk”有其他东西在它的地方… NameVirtualHost *:80 <VirtualHost bk:80> ServerName bk DocumentRoot /var/www/bk.com/ </VirtualHost> 和我重新启动Apache时得到这些错误: [Mon Jan 17 10:28:56 2011] [error] VirtualHost bk:80 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results [Mon Jan 17 10:28:56 2011] [warn] NameVirtualHost bk:80 has no VirtualHosts 我不明白…其他2个网站我有虚拟主机configuration完全相同的方式不要抛出任何错误 更新 修正了一个错误消息 – 这里是我现在的位置.. <VirtualHost bk:80> […]