Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
39

I shall show you. The configuration file server { server_name example.com www.example.com; root www/pub; } server { server_name ~^(.*)\.example\.com$ ; root www/pub/$1; } Test files We have two test files: $ cat www/pub/index.html COMMON $ cat www/pub/t/index.html T Testing Static server names: $ curl -i -H 'Host: example.com' http://...


23

The = modifier in location block is an exact match, without any wildcards, prefix matching or regular expressions. That's why it doesn't work. On your regex attempt, [a-z] matches a single character between a and z. That's why it doesn't work for you. You need to have your locations set up like the following. Note the order of location statements. nginx ...


17

With BIND, you need a fake root zone to do this. In named.conf, put the following: zone "." { type master; file "/etc/bind/db.fakeroot"; }; Then, in that db.fakeroot file, you will need something like the following: @ IN SOA ns.domain.com. hostmaster.domain.com. ( 1 3h 1h 1w 1d ) IN NS <ip> * IN A <ip> With that configuration, BIND ...


17

A wildcard covers only one level. So *.example.com will cover foo.example.com, bar.example.com, and staging.example.com but not foo.staging.example.com or example.com. However you can have multiple names (including wildcards) on the same certificate, so in principle a single certificate could be issued covering all the above names. I know that CAs will ...


16

When Wildcard SSL certificate is issued for *.domain.com, you can secure your unlimited number of sub domains over the main domain. For example: sub1.domain.com sub2.domain.com sub3.domain.com sub*.domain.com If the Wildcard SSL certificate is issued on *.sub1.domain.com, in that case you can secure all second level subdomains which are listed under the ...


16

If you ever put a computer in that domain, you will get bizarre DNS failures, where when you attempt to visit some random site on the Internet, you arrive at yours instead. Consider: You own the domain example.com. You set up your workstation and name it. ... let's say, yukon.example.com. Now you will notice in its /etc/resolv.conf it has the line: search ...


14

Is a wildcard DNS record bad practice? Personally, I don't like it. Especially when there are machines in that domain. Typos go unchecked, errors are less obvious... but there's nothing fundamentally wrong with it. The only negative I found is that someone could link to my site using http://i.dont.like.your.website.mywebsite.tld. Have your http server ...


12

Apache searches for a match in the order that the domains are defined. If I understand you problem correctly then it can be solved by defining your hosts to be excluded before the catch all host. <VirtualHost *:80> ServerName excluded.example.com ServerAlias something.example.com ... ... </VirtualHost> <VirtualHost *:80> ...


12

A wildcard only matches one domain level, so *.staging.example.com would not be matched and you need another cert for subdomains of it. https://en.wikipedia.org/wiki/Wildcard_certificate


11

Just to add that Amazon Route 53 supports wildcards in any record type. So you can safely use Route 53 as your DNS provider.


11

The more specific DNS record overrides the wildcard. So your CNAME should override your wildcard A. What this might be is that you still have the domain name cached to the a record. Use the dig command: dig @yourdnsserver mydomain.freshdesk.com Normally it should return the CNAME.


10

As have said mschuett, you can use regexp First check that postfix supports regexp: root @ mail / # postconf-m | grep regexp regexp root @ mail / # Create the file /etc/postfix/aliases-regexp and add to it your regexp root @ mail / # cat /etc/postfix/aliases-regexp /notification-message-[0-9]+@example\.net/ notification@example.net root @ mail / # Run ...


10

The wildcard is working fine, which is why a.test.carrie resolves. Your issue is that test.carrie doesn't resolve. The reason is simply that you haven't got a record for test.carrie. *.test.carrie matches immediate subdomains of test.carrie, but matches neither test.carrie itself, nor any subdomains of subdomains of test.carrie. Add another record ...


10

I need to have a wildcard certificate that recognizes a prefix; so it would be www.*.domain.com. That means, www.one.domain.com, www.two.domain.com, www.three.domain.com, etc would all work correctly. Is this possible, and is there a SSL provider that can do this? No. According to the rules of the CA browser forum, RFC2818 and RFC6125 only one ...


9

iptables does not know wildcards but used the CIDR method. F.e: -s 192.168.0.0/24 will cover all the hosts from 192.168.0.1 to 192.168.0.254. You can find more info about CIDR here


8

This could be worth a new round of tests with current browser versions. My personal quick check results in: Firefox 20.0.1 seems to still not support this. It shows: This certificate is only valid for *.*.mydomain.com ...when surfing to https://svn.project.mydomain.com. Internet Explorer 9.0: The certificate of this website was made for another ...


8

According to the dnsmasq man page address=/#/1.2.3.4 should do the trick.


7

I was just doing some research on this as I have the same requirements to secure sub subdomains as well and came across a solution from DigiCert. This certificates says it will support yourdomain.com, *.yourdomain.com, *.*.yourdomain.com and so on. It is currently rather pricy, but the hope is that other providers would start offering similar certificates ...


7

No wildcard per se, but you can specify a CIDR netmask: 192.168.0.0/16 The above would be the CIDR equivalent of the example you gave.


7

I think as it is *.example.com it is only valid for immediate sub-domains, it does not support nesting. You'll have to name it somethingmore.example.com, or buy either an explicit something.more.example.com certificate or another wildcard as *.more.example.com.


7

RFC1912 explicitly acknowledges the existence of wildcard MX records, but warns A wildcard MX will apply only to names in the zone which aren't listed in the DNS at all. RFC4592 is a standard-track RFC that clarifies the existence of MX wildcards (see the example in section 2.2.1). I'm pretty sure your DNS provider is, thus, full of it. I can imagine ...


7

Wildcard DNS records have a single "*" (asterisk) as the leftmost DNS label, such as *.domain.com. Asterisks at other places in the domain will not work as a wildcard, so neither *development.domain.com nor development.*.domain.com work as wildcard DNS records. Source: Wikipedia


7

It's all a matter of opinion. For me it's not bad practice. I'm creating a multi-tenant app which uses a database per tenant. It then selects the database to be used based on the subdomain. For example milkman.example.com will use the tenant_milkman database. Like this I have separated tables for each tenant, like, tenant_milkman.users, tenant_fisherman....


7

I have the same problem, after searching I found the solution at the mailing list unbound-users: [Unbound-users] forwarders problem. Simply set: do-not-query-localhost: no


6

To my knowledge, there is no difference between wildcard and normal certificates. So long as you have full control over domain.com's DNS, then there's no reason not to use a wildcard. In fact, I would recommend it in your case. What are your specific concerns with them? (IMO, Redirects such as the one you suggest are always a bit of a fudge when they're ...


6

Not really a wildcard, you can match IP Adresses by subnets: 192.168.0.0/16 192.168.1.0/24 192.168.2.0/25 Another way is to use ipranges like this: iptables -A INPUT --destination-port 80 -m iprange --src-range From_IP-To_IP -j ACCEPT There is a second module for --dest-range as well.


5

If possible, use lftp as your sftp client (available for all the relevant Linux distros and *BSDs in their package collections): lftp sftp://someaccount@somehost.com Then you can use mgetcommand: mget javascript.gs stylesheet.css If lftp is not possible to use, then you can use -b (batch) option in standard sftp command. First create a text file ...


5

That should work fine, however, I'd probably use an A record, rather than a CNAME record to save that extra lookup. Also, bear in mind that this will resolve them to www.domain.com. but not redirect. So, for example, if a user starts accidentally using ww.example.com - they will be lead to believe that this is the correct web-address, which could cause ...


5

No, you can't have a wildcard there. Instead, use symlinks: ln -s /path/to/application-1.2.2/client/app /path/to/application/client/app and have the config read <VirtualHost *:80> Servername www.website.com DocumentRoot /path/to/application/client/app/ ErrorLog /var/log/apache2/logs/application.log </VirtualHost> ...


5

This is because the result of the *mysql* globbing depends on the content of the directory you are in. Your shell interprets the * character (unless you escape it or hide it in quotes) by trying to match it to file names in the directory. To illustrate, execute (in each of the directories in question) echo yum list installed '*mysql*' echo yum list ...


Only top voted, non community-wiki answers of a minimum length are eligible