I have an Apache instance serving a site on port 8000 of my server (whose ip is 164.177.156.36)
Listen 8000
<VirtualHost *:8000>
ServerName lessico.pistacchioso.com
DocumentRoot /home/pistacchio/sites/lessico/
[..]
This works if I visit http://164.177.156.36:8000/
On my registry provider (that is not the same a my server provider) i have the following records set:
pistacchioso.com is the domain i registered and i want lessico.pistacchioso.com to point to http://164.177.156.36:8000/
Those seeweb.it servers are the domain register's ones, i'm ok leaving the mail there (MX) and I can't remove those two NS records (while I can add others).
At the moment, if I visit http://lessico.pistacchioso.com/ I still see the register's courtesy page. The DNS already updated, because pistacchio.com shows apache's standard default page. Any help? Thanks
I can confirm that, for me:
DNS shows I would expect:
Browsing to
http://164.177.156.36:8000/
appears to show the right pagehttp://lessico.pistacchioso.com:8000/
shows the same pagehttp://lessico.pistacchioso.com/
showsthe default web page for this server.
becauseno content has been added, yet.
I think that what you're missing here is that you're telling the browser to use the
http
protocol - right there in the first 4 characters of the url,http://
Browsers understand that, unless another port number is specified,
http
means port 80, sohttp://lessico.pistacchioso.com/
is interpreted as if it werehttp://lessico.pistacchioso.com:80/
. However, in the snippet you've provided above, you've usedVirtualHost *:8000
to tell Apache to only listen on port 8000 for this request.This explains why
http://lessico.pistacchioso.com:8000/
works: you're explicitly telling the browser to use port 8000; and you've told Apache to listen on port 8000 and what to do with requests received there.Change that line to
VirtualHost *:80
and you'll be answering traffic on port 80 instead. TheServerName
directive you have on the next line ensures that only traffic for the hostlessico.pisacchioso.com
will be handled by this vhost - all other hostnames will still fall back to the default vhost with the default content you're already so familiar with :)Edited to add:
There's one other wrinkle. You said:
That's different from what I see - I get Apache's standard page on
http://lessico.pistacchioso.com/
. I'm guessing that either your DNS host updated something between when you posted and when I responded; or possibly you still have an old record cache. I'd suggest checking this withhost
as I've done above to make sure you're seeing the correct records.