Can't add another domain (nano saves file as ms-dos app)

Hi, I'm trying to add my second domain to my linode, but I just can't do it.

I'm following this guide http://library.linode.com/lamp-guides/u … 10-karmic/">http://library.linode.com/lamp-guides/ubuntu-9.10-karmic/ and my first domain is working fine.

I suspect the problem could be related to adding site to /etc/apache2/sites-available/ directory. When I add another site (I'm using Putty and nano), and when I look at the file on server with Filezilla, I see that it is saved as ms-dos application.

For my first domain, file is saved like mydomain.org, but it seems like every time I add a new domain that has a .com extension it is becoming a ms-dos application, not just a file.

If I add a file with .net or else, it's fine, but .com always become ms-dos aplication.

Could this be my problem or is it something else why I can not add another domain? (btw. I changed name servers with my domain registrar, but it was not working, so I swithed them back to my current hosting, till I solve this issue. And yes, I run the "a2ensite" command after adding the second domain ).

Thanks!

6 Replies

nano doesn't do weird things like that. Most likely Filezille is just making a stupid assumption because of the ".com" file extension.

When you say it doesn't work, what exactly do you mean?

Filezilla is just trying to be helpful and tell you what that extension means–on Windows, not on your linode.

I think you can name the site configurations whatever you want, but using the domain name is great.

Before you make any DNS changes (but after enabling the site and reloading apache), the quick way to test the site is to see what you get:

telnet <ip> 80

GET / HTTP/1.0
Host: www.yourdomain.com</ip>

Edit: then press return TWICE.

Hope that helps!

@mnordhoff:

nano doesn't do weird things like that. Most likely Filezille is just making a stupid assumption because of the ".com" file extension.?

That souds true, probably thats the answer to my "ms-dos" problem.

@mnordhoff:

When you say it doesn't work, what exactly do you mean?

Well, I changed name servers with my domain name registar, and my site is not showing. Instead, I get a page with a lot of adds.

I know about 24h propagination, but no way that any site is showing adds all that time. I changed many name servers in my life, swithing hosting and all, but this can't be right.

Besides, for my first domain, when I prepared everything on linode, and when I changed name servers, only couple of minutes later, my site was working on new hosting (linode) and it was all fine.

"Before you make any DNS changes (but after enabling the site and reloading apache), the quick way to test the site is to see what you get:

Code:

telnet 80

GET / HTTP/1.0

Host: www.yourdomain.com"

where do I type this, in ssh command line (using Putty)?

Thanks for helping me out, really appreciate!

@AndrijaM:

Well, I changed name servers with my domain name registar, and my site is not showing. Instead, I get a page with a lot of adds.

Are you switching to Linode's DNS? Or just changing IPs in the registrar's DNS? The ad page is probably the registrar's own parking page.

@AndrijaM:

where do I type this, in ssh command line (using Putty)?

From a cmd window on your PC, or the ssh command line on your linode. Replace with the IP the site is on. At least if you do this and see the HTML you expect in return, you'll know it's just a DNS problem :)

I'm swithcing to Linode's DNS. Yes, the page is probably the registrars parking page.

Thanks, I just did everything again, made a file in sites-available, did a2ensite, restarted apache, and changed swithced my domain to Linode dns. So will see what will happened…

Solved :)

It must have been that I made some mistake :oops: , don't know what, but now when I did everything from begining again, it works!

Thank you all!

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