ServerAlias doesn't work for one of the aliases

I have a file in the Apache2 sites-available directory that reads (in part):

ServerAdmin morgan@acm.org

ServerName morganpix.com

ServerAlias www.morganpix.com christophermorganphotography.com

DirectoryIndex index.html

DocumentRoot /var/www/morganpix.com/html/

. . .

The browser sees my site if I type morganpix.com or www.morganpix.com, but if I type christophermorganphotography.com (the other alias), I get a broken link message. The christophermorganphotography.com URL is pointing to linode's nameservers on godaddy.com, so I'm not sure why the aliasing isn't working.

I tried adding wild card characters to the ServerAlias line:

ServerAlias *.morganpix.com *.christophermorganphotography.com

With these changes, the morganpix.com URL worked as before, with and without www, but the christophermorganphotography.com link still would not come up.

I searched on the web for an solution to this, but could not find anything of use. Any help would be much appreciated!

  • Chris M.

11 Replies

I'm guessing this is probably an issue with DNS rather than the apache configuration. I can resolve morganpix.com to your IP address, but christophermorganphotography.com doesn't resolve to a valid address. Check your DNS settings and ensure you have an A record setup for that domain.

Doesn't look like an Apache problem, here's what I get when I try to ping it

ping: unknown host christophermorganphotography.com

Check your DNS

You're absolutely right. I hadn't created a DNS zone for christophermorganphotography.com. After I did that, the aliasing worked fine.

I didn't realize I had to set up that extra DNS zone, but now that I think about it, how else could the system recognize the URL?

Thanks for the help!

Chris M.

Oh for DNS I use DNS Made Easy

I like them, allot actually. The pricing is very reasonable also.

Somehow this seems a wee bit more cost effective.

@mwalling:

Somehow this seems a wee bit more cost effective.
$15 a year, it's not really a big impact ya know …… :wink:

Plus I really like the "vanity" DNS servers 8)

@marcus0263:

Plus I really like the "vanity" DNS servers 8) I hope when you say vanity DNS servers you're not talking about having DNS servers with forward and reverse names that fall under your vanity domain. Because that would be wasting two IPv4 addresses for each domain for something most people will never see. And since the IPv4 space is going to run out in a couple of years, that seems pretty irresponsible to me.

@irgeek:

@marcus0263:

Plus I really like the "vanity" DNS servers 8) I hope when you say vanity DNS servers you're not talking about having DNS servers with forward and reverse names that fall under your vanity domain. Because that would be wasting two IPv4 addresses for each domain for something most people will never see. And since the IPv4 space is going to run out in a couple of years, that seems pretty irresponsible to me.
Aaah no they're not, it's called "alias" ;)

@marcus0263:

@mwalling:

Somehow this seems a wee bit more cost effective.
$15 a year, it's not really a big impact ya know …… :wink:

Plus I really like the "vanity" DNS servers 8)

$15 a year for using something you like is not an issue, but I don't understand the value of vanity DNS, I never have. What is the benefit?

@FunkyRes:

@marcus0263:

@mwalling:

Somehow this seems a wee bit more cost effective.
$15 a year, it's not really a big impact ya know …… :wink:

Plus I really like the "vanity" DNS servers 8)

$15 a year for using something you like is not an issue, but I don't understand the value of vanity DNS, I never have. What is the benefit?
It's just a cool factor as in if you're running a biz or personal site of

www.cooldomain.com

Your dns

n0.cooldomain.com

n1.cooldomain.com

n2.cooldomain.com

n3.cooldomain.com

n4.cooldomain.com

For me it's just a "cool" factor as I have a few family/personal domains. With a business though I can see a number of other reasons to use this.

But bottom line is for the cost of lunch I get years service which is very good, very reliable and easy to use. Not to mention I don't have all my eggs in one basket ;)

````
; <<>> DiG 9.4.2-P2 <<>> dontlike.us NS
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2128
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 5

;; QUESTION SECTION:
;dontlike.us. IN NS

;; ANSWER SECTION:
dontlike.us. 86400 IN NS ns2.dontlike.us.
dontlike.us. 86400 IN NS ns3.dontlike.us.
dontlike.us. 86400 IN NS ns5.dontlike.us.
dontlike.us. 86400 IN NS ns4.dontlike.us.
dontlike.us. 86400 IN NS ns1.dontlike.us.

;; ADDITIONAL SECTION:
ns1.dontlike.us. 86400 IN A 67.18.208.100
ns2.dontlike.us. 86400 IN A 69.93.127.10
ns3.dontlike.us. 86400 IN A 65.19.178.10
ns4.dontlike.us. 86400 IN A 75.127.96.10
ns5.dontlike.us. 86400 IN A 207.192.70.10

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Oct 5 12:05:09 2008
;; MSG SIZE rcvd: 199

````
100.208.18.67.in-addr.arpa domain name pointer you.dontlike.us.
10.127.93.69.in-addr.arpa domain name pointer ns1.linode.com.
10.178.19.65.in-addr.arpa domain name pointer ns2.linode.com.
10.96.127.75.in-addr.arpa domain name pointer ns3.linode.com.
10.70.192.207.in-addr.arpa domain name pointer ns4.linode.com.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct