Can't add another domain (nano saves file as ms-dos app)
I'm following this guide
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
When you say it doesn't work, what exactly do you mean?
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
GET / HTTP/1.0
Host:
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
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…
It must have been that I made some mistake
Thank you all!