For one project it was necessary to install a web server, I had access to a Windows 2003 server.
I’ve searched the internet and have found a few articles.
Here’s an overview:

1 wampserver

Download the latest release of Wampserver
Optionally add as much Apache, PHP and MySQL releases as you want
Once you download WAMP, double click the icon and begin the install process.

image_menu_wamp

start wampserver with windows startup
start>run> type in ‘services.msc’ and press enter

scroll down to the two servcies

wampapache
wampmysql

right click them and select properties.

on the general tab change startup from manual to automatic.

also there is a log on tab which u can supply a password and it will start it up with out needing to be logged in

SETTING UP VIRTUAL HOST

** Left click the white half circle -> Apache -> httpd.conf (this opens the file)

** Find:
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

** and replace with:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

** Save httpd.conf

** open in notepad {WampServer install directory}\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf

** Find:
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

** and remove everything under that.

** and replace with:
<VirtualHost *:80>
ServerAdmin webmaster@{DOMAIN}.localhost
DocumentRoot “{WampServer2.0c.exe install directory}/www/{YOUR PATH TO DOMAIN ROOT}”
ServerName {YOUR DOMAIN}.localhost
ServerAlias www.{YOUR DOMAIN}.localhost
ErrorLog “logs/{YOUR DOMAIN}.localhost-error.log”
CustomLog “logs/{YOUR DOMAIN}.localhost-access.log” common
</VirtualHost>

** Replace {YOUR DOMAIN} with any name you want, feel free to customize this.
** Replace {YOUR PATH TO DOMAIN ROOT} with a valid path your domain root (It can be anywhere).

** Save httpd-vhosts.conf

** open in notepad C:\windows\system32\drivers\etc\hosts

** at the end add:
127.0.0.1     {YOUR DOMAIN}.localhost

** Replace {YOUR DOMAIN} with the one you set in VirtualHost.

** Save hosts

** A windows restart is recommended.

2 hmailserver

Configuring your DNS records

Before we install your mail server it is a good idea to ensure you DNS records are correctly setup for email. DNS is vital to the operation of the Internet, and in a nutshell what it does is create a link between a human friendly domain name (e.g. example.com) and an IP addresses. When a user enters a web address into their browser, that domain is then resolved to an IP address which is then used to communicate. When hosting your own email server there are three very important types of DNS records to consider, and these are A, PTR and MX records.

An A record, or Address record is one of the most common types of DNS records you’ll come across. Its purpose is to simply create a link between an IP address and a domain name. For example for the domain name of example.com you would have an A record that contained the IP address of the server that was hosting example.com. With A records the domain must be unique, but the IP address does not. This means you can have as many domain names pointing to the same IP address as you want, and is used extensively these days for both Email and Web hosting. In regards to your Email environment, it is best to create a separate A record that identifies your email server. This can be something like mail.example.com or similar. You’ll need to create an A record for each server you plan on using as a mail server.

A PTR, or Pointer Record is unique in DNS in that you can only have one PTR address per IP address. This is because the function of a PTR record is to resolve a human friendly name from an IP address, instead of the other way around. Because you are resolving a domain name from an IP address, there can only be one authoritative record. If possible it is best to set your PTR record of the IP your email will be hosted from to be the same as your A record (e.g. mail.example.com), and you may need to contact your hosting company to do this for you.

Finally we have the MX, or Mail eXchange record which is used by other mail servers to direct email to the right place. Unlike an A or PTR record an MX record is not associated with an IP address in anyway, but instead contains the human friendly name of the A record you wish to use for your mail server. This might sound a little redundant as all it is doing is pointing from one record to another, but MX records also have one other important function. This is to establish the pecking order of your email servers by using a preference field in which you can enter a numerical value (the lower the number, the more important that server is) to define in what order other email servers should contact your email servers. If the email server with the highest preference (lowest number in preference field) is not contactable, then incoming email servers will simply use the server identified by the MX record with the next highest preference.

Installing hMailServer

That is most of the heavy stuff out of the way. From here on in it is all installing and configuring hMail, which is all done via a GUI interface meaning I can use screen shots to do the talking and is hopefully easier to follow. Click any of the images to get a pop-up window displaying a full sized image.

After downloading the latest stable hMail server installer package (currently 4.3.1) from the hmailserver website, double click on it to initiate the install process as shown below in figure 1.

hmailserver1

Select the installation path for hMail as shown below in figure 2.

hmailserver2

Select a full or custom install of hmail (full recommended) as shown below in figure 3.

hmailserver3

Select wether to use the MySQL server built into the hMail distribution, or use an external database. If this is a dedicated email server then it is recommended to use the built in database server as shown below in figure 4. However, if you already have MySQL installed (or are planning to) or would like to use Microsoft SQL server then select the external database server option.

hmailserver4

Set the start menu program group for hMail as shown below in figure 5.

hmailserver5

Confirm your settings as shown below in figure 6.

hmailserver6

Click install and hMailServer will be installed as shown below in figure 7.

hmailserver7

Once installation is complete, make sure the “Run hMailServer administrator” option is checked as shown below in figure 8 and click finish.

hmailserver8

Configuring hMailServer

With the installtion of hMailServer successfully completed, the next step is configuration. The configuration steps below show you how to add a domain, add an account, create an alias, setting the server host name, configure RFC settings and configure SMTP relay options to prevent open relay. Start by clicking the Add domain button as shown below in figure 9.

hmailserver9

Enter the domain name as shown below in figure 10, and then set the catch-all address. If a mail is sent to an address on your domain that does not have a POP account or alias, then it is redirected to the catch-all address. In this example we have set the catch-all address to postmaster@example.com. From here you can also set the global maximum mailbox size as well as the maximum message size for your domain. Once the domain is created you are also able to access several other tabs to set global settings, but they are not covered in this guide.

hmailserver10

With the domain setup, it is now time to create accounts. To be RFC compliant all domains should accept email to a postmaster account, and as we have set postmaster to be the catch-all we will now set up an account for it. Place the name of the account in the Account address feild, and then enter a password as shown below in figure 11. You can also set individual mailbox and message size, as well as many other options not covered in this guide such as Active Directory intergration, auto-reply, forwarding, signature and fetching of email from external accounts.

hmailserver11

Sometimes it is not practical or desirable to setup an account for every email address you want, and in this case it can be handy to uses an email alias that points to an existing account. In this example we will create an alias of abuse@example.com that points to the postmaster@example.com. Simply enter the alias you’d like to use (in this case abuse) in the Redirect from feild and enter the account and domain ( in this case postmaster and example.com repsectively) in the To feilds. Like the postmaster address, domains are also required to accept email to the abuse email address to be RFC compliant.

hmailserver12

Now that we have a domain, account and alias setup lets look at selecting what email services we want to use. Using the navigation window in the left, select and expand the Settings item and then select the Protocols option. Make sure you have at least the SMTP and POP3 servers ticked, as otherwise you will not be able to send or recieve mail. You may not wish to use the IMAP server, but you will need it if you wish to provide webmail functionality to your users.

hmailserver13

Next step is to set the server host name. In the navigation window on the left, expand the Protocols item and select SMTP. This can be very important as some email servers will not accept email or mark it as spam if the host name does not match the hostname specified in the MX record we set earlier. In the Host Name field enter the full host name you specified in your MX records. In this example we’ll use mail.example.com. Note: If you are looking to host your own email server over your home broadband connection, then you will want to enter the name of your ISP’s SMTP server in the Relayer field. If your ISP requires authentication, then you’ll also need to provide those details in the fields below.

hmailserver14

With the host name set we will now set some extra RFC compliance settings. From the page you are on, simply click on the RFC Compliance tabe at the top. It is important that your email server be RFC compliant as otherwise it is likely that many domains will mark your email as spam, and that is if they accept it at all. One of the RFC requirements for email servers is that they accpet a null sender address. You can enable this ticking the Allow empty sender address option. It is also a good idea to enable the Allow incorrectly formatted line endings option as several popular email server packages out their vary slightly in the way they terminate email messages, and without this option set you email server may not be able to recieve emails from them

hmailserver15

The final step in the basic configuration of your email server is to enure it is not an open relay. An open relay is when a server enables mails to be sent through it to other domains on behalf of domains that do not exist on the local server. Being an open relay is a very quick way in which to get yourself blacklisted, and it can be near impossible to get off these blacklists once you’re on it. Luckily hMailServer makes in very easy to prevent this, and in fact by default you should not have to change a thing. Just to be sure though it is always best to check the settings. In the navigation window to the left, select the select and expand the Advanced menu item from under the Settings tree. From here select the IP Ranges option and then select the Internet option. All you have to do here is ensure that the Local to local, Local to external, and External to local options are ticked from under the Allow deliveries from section. Finally also ensure that the To remote accounts option is ticked from under the Require authentication for deliveries section. All these options are shown below in figure 16.

hmailserver16

Testing the configuration

Almost done now, the only thing left to do is test your email environment to make sure everything is configured correctly and ensure it is not an open relay. First stop is to plug your domain in at DNSReport.com which will give you a good overview of how well your email system is setup. If DNSReport finds any issues of concern it will notify you and offer advice on what needs to be fixed.

There are several tests available for free on the internet for testing your email server for open relay, and the ones I’d suggest using are the tests at abuse.net and aupads.org. Once you have passed these tests then you should be all clear to go ahead and start creating other account and finally sending and recieving email from your very own email server.

3How to Configure SpamAssassin for HMailserver in Windows

1. Download SAWin32 3.2.3.3, which is the latest windows build of SpamAssassin (As of September 8, 20009).
2. Download the latest SpamAssassin for Win32 command-line tools
3. Unzip both files into your computer with HMailServer installed under the path “c:\sa\”
4. Next we will have to create a new Windows Service called “SpamAssassin”. This will allow HMailServer to use SpamAssassin.
1. Install the Windows Server 2003 Resource Kit Tools. This will give you the necessary INSTSRV.EXE and SRVANY.EXE files to run SA as a service
2. Go to Start Menu -> Run -> cmd
3. Under the command line, enter in the following line (with quotes):
“C:\Program Files\Windows Resource Kits\Tools\INSTSRV.EXE” SpamAssassin “C:\Program Files\Windows Resource Kits\Tools\SRVANY.EXE”

4. Once installed, open up Regedit
5. Go to HKLM -> SYSTEM -> CurrentControlSet -> Services -> SpamAssassin
6. Add a new key called “Parameters”
7. Under Parameters, add a new String Value of Application, and set the value data to (without quotes):
“c:\sa\spamd.exe -l -s c:\sa\spamd.log –round-robin”

8. Then go to the services control panel and start up the spam assassin service.
9. If there are any issues, check the c:\sa\spamd.log file for more info
5. Then you might have to allow dccproc and spamassassin in your firewall
6. Adjust your hMailServer settings to allow the incoming e-mail check against SpamAssassin
7. And finally you might have to restart your hMailServer service for the new service to take effect.

Teamviewer + wampserver :

Instructions on how to disable TeamViewer from listening on Port 80. Instructions are as follows:

1. Open port 5938 (TCP) on your firewall.
2. Change the following registry keys.

* [HKEY_LOCAL_MACHINE\SOFTWARE\
TeamViewer\Version4] Key ’GatewayAllowed’ set to 0
*
[HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version4] Key ’ListenHttp’ set to 0

After you make these changes, you should no longer have TeamViewer listening in on port 80, killing your local web server.

4FileZilla server

To install FileZilla server, please follow these steps:

1. Log into your server through Terminal Services or Remote Desktop Connection.
2. Open a Web browser and load http://sourceforge.net/project/showfiles.php?group_id=21558
3. Scroll to the bottom and download the latest install file under FileZilla Server, FileZilla_Server-0_9_23.exe.
4. Once the download completes, run the .exe file.
5. Read the License Agreement and choose “I Agree” to proceed.
6. Select the components you wish to install and click Next.

filezilla1

7. Select the Destination Folder and click Next. We recommend using the default settings.

filezilla2

8. Select how the services should be started and click Next. We recommend using the default settings.

filezilla3

9. Select how the server interface should be started and click Install. We recommend using the default settings.

filezilla4

10. Click Close to finish the installation.
11. Click OK to connect to the FileZilla server.

filezilla5

Once installation is complete, you may begin creating FTP users in FileZilla.

To create a Filezilla FTP user, please follow these steps:

1. From the Edit menu, select Users.

filezillauser1

2. Click Add.

filezillauser2

3. Enter the user name and click OK.

filezillauser3

4. Under Account settings, check the password box and enter a password.

filezillauser4

5. Click Shared folders in the left menu.
6. Under Shared Folders, click Add.

filezillauser5

7. Navigate to the folder the user will have access to and click OK.
8. Check the permissions the user should have on this folder.

filezillauser6

9. Click OK.

Recommended Posts

No comment yet, add your voice below!


Add a Comment

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *