View Full Version : [ubuntu] Can't set hostname

December 23rd, 2010, 04:43 AM

I've looked at several tutorials and since i'm a newb I can't figure them out. I'm trying to set my hostname on my LAMP 10.04. What files do I need to configure? (all IP's below are fake)

Here are the first lines from /etc/apache2/sites-available/default

ServerAdmin webmaster@localhost

/etc/apache2/ports.conf has these lines after the comments

Listen 80

/etc/hosts localhost mysite.com



Thank you,

December 23rd, 2010, 04:53 PM
/etc/hostname + reboot.
having it in /etc/hosts is a good idea.

unless, of course, by "set my hostname" you do not really mean "set the hostname" but something completely different such as "set up apache with virtual hosts" or "create a DNS record that resolves my hostname to the correct IP address" or "I'm going to throw a party but I want someone else to be the host".

December 23rd, 2010, 06:50 PM
Thank you, koenn. I've put the hostname "mysite.com" (not really mysite.com) in each of those locations. No errors were reported on reboot. I've tested the Linode by typing the IP in my browser and I can see the default page.

Am I now clear to order a SSL certificate for the domain? SSL is enabled and has been tested.

December 23rd, 2010, 07:36 PM
what you've done so far, afaik, is give the system a name. That's all.

It would help that you explain a bit about what you're doing. Setting up a website / webserver I suppose ?
iirc, SSL certs are FQDN-specific, so you need DNS before you even think about getting a certificate.

Unless you give some context, you risk getting correct answers to wrong questions.

besides that, I'm not really in to web servers and SSL, so if anyone else wants to have a go at this ....

December 24th, 2010, 04:53 AM
Yes, I'm setting up a LAMP web server. It's a VPS from Linode. I will have only one domain on the server. Thanks for your help!