Articles of 虚拟主机

dhclient.conf:发送2个主机名到DHCP服务器?

已经工作: Debian框 在dhclient.conf使用send host-name me.company.com DHCP DNS会自动使用me.company.com的条目进行me.company.com 我想补充的是: 发送第二个主机名,所以两者都自动注册到DNS 换句话说:我希望DHCP客户端使用不同的名称两次向DNS注册,最好不必手动维护DNSlogging。 这甚至可以用DHCP?

如何监视所有我的Apache通配符虚拟主机?

我有一个这样的虚拟主机: <VirtualHost *:80> … ServerAlias *.domain.com … </VirtualHost> 我的目标是为每个子域(CPU使用率,内存使用率,请求/秒等)提供独立统计数据的网页,并有可能定义警报并查看统计历史logging。 你推荐什么开源工具?

可以configurationApache2虚拟主机在基于主机名的目录中查找文件?

几乎问题的标题是什么。 在我的本地机器上,我一直在为每个正在处理的客户端网站设置命名的虚拟主机。 如果我可以指定一个通配符规则,那会更快一些: HTTP:// [主机名] 指的是中的文件 〜/站点/ [主机名] / 自动,而不必每个创build一个条目(我现在有) 这可能吗?

lighttpd + FastCGI + Mono不能与evhost启用

我已经开始将Windows VPS迁移到linode.com,在nginx和apache上selectlighttpd来托pipe一些build立在asp.net mvc上的网站,而且我坚持认为是“文档根”冲突。 我在Ubuntu 10.04上运行lighttpd 1.4.6,Mono 2.8.2 我已经configurationmod_evhost模式来匹配这个目录结构: /var/webs/country-tld.tld.domain/www /var/webs/country-tld.tld.domain/subdomain 并从请求中删除所有的“www”,redirect到url,并且对于静态内容一切工作正常,但是当加载aspx页面时,我总是得到default.aspx的404错误。 当我将server.document-root设置为任何网站(绕过evhost规则)时,Mono工作正常,按预期为aspx页面提供服务。 其中指出我认为,当evhost被启用时,“MONO_FCGI_ROOT”= server.document-root被混合的其余configuration导致aspx内容的404。 有没有人有这样的环境设置经验? 在使用Apache + mod_mono设置所有内容或者为每个主机使用单独的fastcgi映射之前,我真的希望给lighttpd的configuration优雅和简单一个机会。 这些是我的configuration文件。 /etc/lighttpd/lighttpd.conf: server.modules = ( "mod_access", "mod_alias", "mod_accesslog", "mod_compress", "mod_rewrite", "mod_redirect", "mod_evhost" ) server.document-root = "/var/webs/default/" server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) server.errorlog = "/var/log/lighttpd/error.log" index-file.names = ( "index.html", "index.htm", "default.htm", "default.html" ) accesslog.filename = "/var/log/lighttpd/access.log" url.access-deny = […]

重新启动后,Apache虚拟主机设置始终失败

只需在Debian 6中设置一个Apache Web服务器,并添加以下虚拟主机: <VirtualHost 123.45.67.89:80> ServerAdmin [email protected] ServerName mysite.com ServerAlias www.mysite.com DocumentRoot /srv/www/mysite.com/public_html ErrorLog /srv/www/mysite.com/logs/error.log CustomLog /srv/www/mysite.com/logs/access.log combined </VirtualHost> 而我启用它(默认的虚拟主机也启用): a2ensite mysite.com 刷新: /etc/init.d/apache2 reload 我的/ etc / hosts如下: 127.0.0.1 localhost.localdomain localhost 123.45.67.89 myhost.mysite.com myhost 然后我通过访问mysite.com和www.mysite.com进行testing。 一切工作正常在这一点上。 问题是,每次我重新启动,我不能再访问我的网站了。 不适用于mysite.com和www.mysite.com 。 在摆弄和监视日志之后,似乎重启后apache总是在/ etc / apache2 / htdocs中查找文件。 没有在任何configuration文件中指定。 我可以在重新启动后重新启动的唯一方法是发行/etc/init.d/apache2 reload 。 有什么build议么? 提前致谢。 [更新1] 这是/ etc […]

ISPConfig发送的HTTP请求发送到它的IP地址到它的唯一configuration的站点 – 为什么?

我在IP地址为1.2.3.4的VPS上设置了ISPConfig。 在ISPConfig安装上,我configuration了一个名为example.no的站点。 现在,当我在浏览器中访问example.no时,它正确地显示文件夹/var/www/example.no/web 。 问题是:当我访问http://1.2.3.4时,它也显示/var/www/example.no/web 。 这不应该发生,是吗? 可能是什么原因? 综上所述:1.2.3.4是安装有ISPConfig的VPS。 它有Apache,FTP软件,DNS软件,快递等安装和ISPConfig正在处理它们。 当我访问该服务器上托pipe的站点的域名时,我希望将其带到该服务器上的正确文件夹,即我。 但是,当我访问服务器的IP地址,我期望没有发生。 而是显示当前configuration的唯一站点。

httpd虚拟主机configuration(含光油) – 1个服务器/多个域

我一直在阅读有关这个​​主题的多个问题,但我似乎无法得到它的工作… 我有一台运行CentOS的服务器,HTTPD在默认的httpd root下运行1个网站: Listen 8080 DocumentRoot "/var/www/html" <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>` 我也运行Varnish:Varnish正在侦听端口80,并将请求转发到正在侦听端口8080的httpd 现在我想在这台服务器上运行第二个域,所以我在/ etc / httpd / conf /下面添加了一个.conf文件,内容如下: <VirtualHost *:8080> ServerAdmin root@localhost DocumentRoot /var/www/vhosts/domainx.be ServerName domainx.be ErrorLog logs/domainx-error_log CustomLog logs/domainx-access_log common </VirtualHost> 当我应用以上时,所有stream量(包括根域的stream量)都被路由到domainx。 当我将vhost的端口改为80时,domainx会被转发到根主机。 这是我第一次没有像安装Webmin的Plesk这样做,所以我不知道从哪里去这里….

转发子域名

如何将//sub.domain.com转发到//sub.domain.com 这是一个虚拟主机 <VirtualHost *:443> Include /etc/apache2/vhosts.d/ssl.conf.include DocumentRoot /scripts/htdocs/domain-live ServerName sub.domain.com ErrorLog /var/log/apache2/smartdox-wellpoint_error CustomLog /var/log/apache2/smartdox-wellpoint_access combined <Directory /scripts/htdocs/smartdox-live> Options -Indexes FollowSymLinks Includes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:433> Include /etc/apache2/vhosts.d/ssl.conf.include ServerName www.sub.domain.com RewriteEngine On Redirect 303 / https://sub.domain.com </VirtualHost>

多个IP地址上的多个虚拟主机

可能重复: 多个IP地址上的多个虚拟主机 我正在运行Ubuntu 11.10,我有两个IP地址分配给我的VPS(Linode)。 我已经按照他们的指导启用静态地址(可以在这里find: http : //www.linode.com/wiki/index.php/Configure_Static_IPs ) 目前的情况是,我有3个网站在这个Linode,我想设置它们,所以site1和site2将使用IP1,site3将使用IP3 /etc/apache2/sites-available/site1.com <VirtualHost 1.1.1.1:80> # Admin email, Server Name (domain name) and any aliases ServerAdmin [email protected] ServerName site1.com ServerAlias www.site1.com # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /home/site1/public_html # Custom log file locations LogLevel warn ErrorLog /home/site1/public_html/log/error.log […]

木偶apache虚拟主机自动部署

你好,木偶:), 我希望你能帮助我一个情况。 也就是说,我将使用puppet来部署很多(我的意思是很多)节点与Apache安装。 我有的问题是,现在唯一的方法来创build一个具有指定ServerName虚拟主机是发出主puppetmaster文件(site.pp)中的服务器名称。 它看起来像这样: case $::hostname { hostname1: {vhost_default { 'hostname1.domain': }} hostname2: {vhost_default { 'hostname2.domain': }} 有没有办法创build一个虚拟主机文件,而不必发出名称。 意思是说,puppetmaster读取主机名并将其自己写入模板。 模板看起来如下(只有重要部分): <VirtualHost *:80> ServerName <%= fqdn %> ServerAlias www.<%= fqdn %> 和模板部分的Apache的init.pp:define vhost_default(){ file { "/etc/apache2/sites-available/domain.conf": owner => 'root', group => 'root', mode => 644, content => template( 'apache/default_vhost.erb' ), require => [ Package[ 'apache2' […]