Setting a third level domain

Hi all

i'm trying to setup a third level domain for my website http://www.morlotti.com but i'm having few troubles.

I already set with my hosting service two CNAME dns ( en.morlotti.com and ru.morlotti.com ) and the roots on the vps are already up.

My problem is setting up the apache2 correctly.

I'm pretty newbie, i'm not the person who configured linode, and he don't work anymore here.

thanks for the answers!

9 Replies

https://library.linode.com/web-servers/ … tual-hosts">https://library.linode.com/web-servers/apache/installation/ubuntu-12.04-precise-pangolin#sph_configure-name-based-virtual-hosts Should help you out :)

https://library.linode.com/hosting-website#sph_id8

this isn't working on me :\

i created a en.morlotti.com into data/www

i set a public folder inside.

then i created the

sudo nano /etc/apache2/sites-available/en.morlotti.com

DocumentRoot /data/www/en.morlotti.com/public/

saved, but at the end trying to restart/reload apache2 don't work…

root@morlotti:/# sudo /etc/init.d/apache2 reload

sudo: unable to resolve host morlotti

sudo: /etc/init.d/apache2: command not found

root@morlotti:/# sudo service apache2 restart

sudo: unable to resolve host morlotti

apache2: unrecognized service

:\

any help ?

Post your configs. Make sure you also did a a2ensite en.moriotti.com (or whatever thename of the vhost is in sites-available)

a2ensite is already done and ok.

What kind of configuration do you need?

thanks

Your vhost config would be great.

any hint how to tell you the exact config ? :\

I'm on linode 1gb, and the directives on site-available are:

ServerAdmin xxxxx@xxxxxx

ServerName en.morlotti.com

ServerAlias http://www.en.morlotti.com

DocumentRoot /data/www/en.morlotti.com/public/

ErrorLog /data/www/en.morlotti.com/logs/error.log

CustomLog /data/www/en.morlotti.com/access.log combined

BUT… i don't understand why in the "sites-available" root, there isn't any of the actual active web-sites…

i repeat that i'm not the person who configured this machine.

Actually there are 3 dns pointing to the machine, new.morlotti.com, stats.morlotti.com, morlotti.com.

None of them is under sites-available or sites-enabled

If the other active sites are not in sites-enabled, it might not use that at all. Could you also post /etc/apache2/apache2.conf (or /etc/apache2/httpd.conf)

Edit: Either way, you shouldn't have http:// in the serveralias.

You might receive quicker help at IRC: https://www.linode.com/irc/

I'm online there as well, I'm not watching the chat 24/7 but I try to look when I can so we (there's lots of people on IRC who can help) can go through it :)

( joined @ irc )

what line of apache2.conf do you need ?

http://sprunge.us/ROQi

apache2.conf here

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