Articles of 通配符子域

从* .domain.com到www.domain.com的DNS通配符条目

如果用户inputww2.domain.com,他应该被redirect到www.domain.com。 这应该是可能的所有种子域(例如xxx.domain.com,ww.domain.com,…)。 我应该如何设置DNSlogging? 这个DNS入口能工作吗? *.domain.com. CNAME (Type) 3600 (TTL) www.domain.com. 解: 有几个步骤涉及到这一点。 首先,我创build了这样的DNS通配符条目 *.domain.com A 3600 1.2.3.4 domain.com A 3600 1.2.3.4 比在networking主机设置我添加了一个SEOredirect*.domain.tld => www.domain.tld R = 301,L。 此外,对于别名域,子域的通配符已被激活。 比我在我的htaccess添加了以下规则: RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] RewriteCond %{http_host} ^www\.some-domain\.com [NC] RewriteRule ^(.*)$ http://www.main-domain.com [R=301,NC]

自动子域与Apache

我在公司的Intranet上设置了一堆子域名。 我手动设置每个子域。 我想某些子域自动创build。 例如,如果我有/ home / jason / foo和/ home / jason / bar,我希望能够去foo.jason.mydomain.local和bar.jason.mydomain.local,而不必手动设置那些子域。 (“jason”部分可以是硬编码的,我只是希望“foo”/“bar”部分是自动的)。 我find了这个页面 ,这似乎是我想要的,但我无法弥补他们的例子和我正在做的事情之间的差距。 有人可以帮我吗? 谢谢,杰森

通配符子域设置…要更改主机IP抛出客户端Alogging…该怎么做

这是目前设置(简而言之)。 该网站设置了通配符子域名,因此* .website.com是可访问的。 然后,客户端可以将他们自己的域名映射到服务器IP地址的Alogging中,然后将其转换为适当的* .website.com,并在htaccess中指定方向和envvariables。 一切工作都很完美…但现在出现了问题。 该站点的规模已经超过了单个DQC Xeon服务器在高峰时段可以处理的数量。 看着云选项似乎很诱人,但客户将他们的域名与Alogging(我们的服务器)指向一个IP地址。 现在,这可能是从一开始就计划不好的,但问题是,如果今天要完成这个任务,我们将如何设置它,以便客户端使用CNAME来将他们的域指向我们的服务器而不是Alogging。 而且,如果这对于根域是不可能的,我们怎么才能使用我们这边的多个IP地址来转换传入的http请求呢? 够复杂吗? 希望我已经解释清楚了!

使用通配符configurationdynamic子域

我想在本地主机上保留一些web项目,这样我的客户就可以访问我正在开发的一些webapps。 我有一个目前映射到我的dynamic家庭IP的域名。 例如: demo.mydomain.com -> maps to my currenty ip running apache 我想要的是将* .demo.mydomain.com映射到我的家庭服务器中的具体文档path customer1.demo.mydomain.com -> should point to the folder where the webapp for the customer1 lives 我知道apache的虚拟主机configuration(即dynamic地将一个子域名映射到Web服务器的path),但问题是,如果我把前一个url在浏览器(customer1.demo.mydomain.com)页面没有find,所以我猜dns的决议是失败的 问题是我应该如何configuration我的域名提供商以允许子子域名通配符? 我正在使用Enom(在设置我的Google Apps帐户后获得)

htaccess – 通配符子域到子文件夹

所以这个想法是我有: domain.com/.subdomains/domain1 (2,3,4,etc) 而我想映射: domain1.domain.com -> domain.com/.subdomains/domain1/ domain2.domain.com -> domain.com/.subdomains/domain2/ 但是我希望它忽略“www” 我这样做是半成功的: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com [NC] RewriteRule ^(.*)$ http://domain.com/.subdomains/%1/$1 [NC,QSA,L,P] 有两个问题: 1)它不会忽略“www” 2)当我去到URL: http://domain3.domain.com/deep/subfolder/here/index.html 它将我redirect到: http://domain.com/.subdomains/domain3/deep/subfolder/here/index.html 我一直在试图find答案,但我找不到任何其他人有这个问题。 有任何想法吗? 谢谢! 编辑: 好吧,似乎我不能使用http,但如果我改变 RewriteRule ^(.*)$ http://domain.com/.subdomains/%1/$1 [NC,QSA,L,P] 至 RewriteRule ^(.*)$ /.subdomains/%1/$1 [NC,QSA,L,P] 它进入一个奇怪的redirect循环

Lighttpd将子域重写为子文件夹

我有一个服务器(本身在一个子域)与通配符DNS指向它。 服务器运行Lighttpd和PHP。 我需要http://any-subdomain.server.example.com重新写入http://server.example.com/site/any-subdomain ,并从那里提供服务。 它必须对用户完全透明。 这是我的相关configuration: $HTTP["host"] =~ "^(.*)\.server\.example\.com$" { url.rewrite-once = ( "^(.*)" => "/site/%1/$1" ) } 它似乎工作除了子文件夹,其中redirect到subdomain.server.example.com/site/subdomain/subfolder ,然后404的。

Apache子子域和现有的通配符子域

所以我有一个现有的通配符DNSlogging和子域虚拟服务器设置如下 DocumentRoot /path/to/code <Directory "/path/to/code"> allow from all Options +Indexes </Directory> ServerName existing.domain.co.uk ServerAlias *.domain.co.uk …我现在想添加另一个虚拟服务器,它以相同的方式工作,但有一个子子域,允许我从类似monkeys.alt.domain.co.uk访问代码库的一个分支 DocumentRoot /path/to/altcode <Directory "/path/to/altcode"> allow from all Options +Indexes </Directory> ServerName alt.domain.co.uk ServerAlias *.alt.domain.co.uk 在DNS区域文件中,我添加了另一个从* .alt到IP的logging(恰好与* Alogging相同的IP)。 现在我正在想的是,现有的通配符正在拾取monkeys.alt.domain.co.uk并将其发送到现有的虚拟服务器而不是新的虚拟服务器。 我的问题:我如何获得来自monkeys.alt.domain.co.uk的stream量转到新的'alt'虚拟服务器?

子域的nginx通配符server_name给出index.php 404错误

我一直在使用这个服务器configuration的WordPress,这在我的本地机器上效果很好: server { server_name example.example root /home/user/sites/example/example/html; index index.php index.html index.htm; access_log off; error_log /home/user/log/error.log; location / { try_files $uri $uri/ /index.php?q=$uri&$args; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 现在我还有其他的wordpress安装,所以我读了通配符和子域名,并尝试这样的: server { server_name ~^(.*)\.example; root /home/user/sites/example/$1/html; index index.php index.html index.htm; access_log off; error_log […]

使用数百个dynamic子域pipe理AWS EB网站的DNS

一个域名系统(DNS)的问题:(也被问到堆栈溢出 ) 我有一个amazon web services(AWS)Elastic Beanstalk(EB)站点,可能有数千个子站点。 显然,在AWS上使用Alogging是不可能的,因为它们可以实现服务器平衡,并且可以移动IP地址。 到目前为止,我已经设置了一个CNAMElogging: www CNAME http://mysite.elastic-beanstalk.com. 和networking转发,以处理对“裸”域的请求。 @ / http://mysite.elastic-beanstalk.com 我现在需要将子域名映射到正确的位置: url typed and seen by the user >> currently live and working page subdomain1245.mysite.com >> http://subdomain1245.mysite.elastic-beanstalk.com : www.subdomain1245.mysite.com >> http://subdomain1245.mysite.elastic-beanstalk.com … X1000 我能find的最接近的教程提到了“通配符”DNS匹配,如: * CNAME http://mysite.elastic-beanstalk.com. 我尝试了后者,从testing中我可以看出,它只是将所有子域redirect到主域。 我需要子域保持显示在url中,并redirect到子域名页面。 如果有人能够展示并且理想地解释一个策略,那么这将是非常有帮助的! ******* UPDATE ********* 新的线索: 使用* CNAME http://mysite.elastic-beanstalk.com. ,访问subdomain1245.subdomain1245.mysite.com提供正确的页面(subdomain1245.mysite.elastic-beanstalk.com)。 我们find了另一个可能的select:删除* CNAME […]

通配符子域redirect到文件夹而不更改url

所以我有我的htaccess文件设置,它看起来像这样: Options +FollowSymLinks RewriteEngine on RewriteBase / # MAGIC RewriteCond $1 !/$ RewriteCond $1 !\. RewriteRule ^(.+)$ /$1/ [R=301,L] # //MAGIC RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} ^([a-z0-9][-a-z0-9]+)\.domain\.com RewriteCond %{REQUEST_URI} !^/subdomains/ RewriteRule ^(.*)$ /subdomains/%1/$1 [P,NC,QSA] 我工作得很好,很好地指导phpmyadmin.domain.com到phpmyadmin.domain.com/subdomains/phpmyadmin/ 但我认为这是相当丑陋的,这表明在url。 所以我希望它静静地redirect,所以它仍然指向phpmyadmin.domain.com/subdomains/phpmyadmin/,但客户端只能看到phpmyadmin.domain.com 我一直在环顾四周,但我找不到像我想要的那样工作的任何东西。 有没有人有一个想法如何解决这个问题?