Author Topic: [Tutorial][Windows users] How to test your server before putting it on-line  (Read 12167 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
You might want to test your new server before pointing your domains to it because you are not sure if it was well configured, so you have to test it out before doing something that you might regret about it.

This tutorial is only for windows users (but you are able to do this on linux, try to search for similar)
---
First you need to simulate your domains and sub-domains on your computer, so edit:
C:\Windows\System32\drivers\etc\hosts (open it with notepad)

And imagine that your server IP is "192.168.30.133" and your domains are "fancydomain.com" and "awesomedomain.com", just add these lines

Quote
#Simulate my server
192.168.30.133 fancydomain.com
192.168.30.133 www.fancydomain.com
192.168.30.133 awesomedomain.com
192.168.30.133 www.awesomedomain.com
("www." doesn't need to be configured but you might need to access throw "www." to your websites and without this configuration you'll not able to access it, because "www." is a sub-domain and it needs to be configured)
(You can test subdomains as well like: "192.168.30.133 subdomain.fancydomain.com")

Also clean your DNS cache by executing this windows console command:
Quote
ipconfig /flushdns

I also recommend you to clear your internet browser cache.

Also ping your domains to see if they are correctly pointed to your server. On your windows console, type:
Quote
ping fancydomain.com

You should have something like
Quote
Pinging fancydomain.com [192.168.30.133] with 32 data bytes:
Reply from 192.168.30.133: bytes=32 tempo=63ms TTL=53
Reply from 192.168.30.133: bytes=32 tempo=63ms TTL=53
Reply from 192.168.30.133: bytes=32 tempo=63ms TTL=53
....
If it returns your server IP (in this case "192.168.30.133", everything is right)
Also ping your subdomains!!!

--
This configuration overwrites your hosts locally, so the domains that you are using, doesn't even need to exist, you just need to create and configure them on your server so when they exist, your server will know how to handle them.
After all the tests, and your domains are directly pointed to your server, i recommend you to remove this configuration or just comment every line you added it with an "#" - otherwise you might start not to see the same as your visitors.

-------------
You might also need to test your email accounts, but this configuration above is not going to do anything for you, since this is configured locally and gmail (for example) is not going to know your local configurations - so gmail is not going to send out emails to your server.

But we can simulate the same gmail steps that gmail (or any other email provider) does, for this i recommend you to use windows telnet (if you are using Windows 7 or above you need to activate telnet since it doesn't came installed anymore - see here how to)
After you have Telnet installed, open your Windows Console and execute:
Quote
telnet 192.168.30.133 25
(192.168.30.133 is your SMTP server IP - usually is the same as your server IP)

Then execute these commands:
Quote
---- SMTP COMMANDS TO EXECUTE------
HELO this_is_me.com
mail from: pedro@this_is_me.com
rcpt to:<pedromidiasf@domain_to_test.com>    always add "< >" to the email you want to test
data
From: pedro@this_is_me.com
Subject: test email
     (blank paragraph)
this is an email
.
---- END OF SMTP COMMANDS------

If you want to test if your server is sending emails, you can send it throw roundcube to a gmail account (i use gmail, it doesn't complain too much) and always take a look at your gmail spam folder because it might get there.
Also take a look on your server mail queue (go to: Email - Manage Mail Queue) for details if it gets queued.
Also be aware that if you have "Reject Unknown Hostname" configured on your "Postfix Manager", you'll not be able to send emails from your computer to your server, because you might not have a known hostname, so disable that option and test it without it, and in the future, you can active it if you want to.

I always recommend you to test all domains when talking about emails.

-------------
Hope it helped, it's how i do it every time i need to :)
« Last Edit: April 29, 2015, 12:57:46 PM by pedromidiasf »

Offline
*
Thanks for the tip!  :D
------
https://CyFocus.com - Domain, Hosting, Ecommerce, SEO