e107help.org Q&A
0 like 0 dislike
##INSTALLING E107 ON A HIAWATHA WEB SERVER RUNNING ON WINDOWS 10.

##!!!FIRST OFF,
#!!!!MAKE A BACKUP OF THE hiawatha.conf file that came with
##!!!your installation of hiawatha, it is located in hiawatha/config folder.
##!!! AND MAKE A BACKUP OF YOUR WINDOWS HOSTS FILE LOCATED HERE, C:\Windows\System32\drivers\etc
##!!! The file name is hosts   , and it needs altered or your site will not display
##!!! even if your php hiawatha and database are all set up correct, so don't miss this step

# In the below example I reffer to a site named mye107
# which has all its files in a folder named mye107
# php version 7 is used, and was compiled to use fast cgi
# it was downloaded from the main php website in a zip for windows 64bit.
# Ensure php and hiawatha are working or none of the below will work and
# you will be in a rather confusing situation.
# Also note at the bottom of this example I have added a / my windows hosts file
# showin five entries for different sites, copy the entry with the mye107 to your
# windows host file and save it, but ensure you make a copy of your original windows
# host file first just to be safe, this is detailed at the bottom of this page.

All that is required is a working hiawatha web server installation,
A working php installation that supposts php fast cgi.
The code snippets below.and to alter your windows host file.

# There is three main sections we need to add or alter in
# the hiawatha.conf file to make this or any other such site work,
#!!!WE ALSO NEED TO ADD A LINE TO THE WINDOWS HOSTS FILE WHICH IS
# DESCRIBED HERE TOO,
## THATS FOUR TASKS THAT HAVE TO BE PERFORMED.

# FIRST,
# Find the script configuration settings in your hiawatha.conf file,
# and edit them using the below example.
#

FastCGIserver {

FastCGIid = PHP7     # This represents, C:\Program Files\PHP7 , alter to suit.
                     # The folder name is all that matters (for consistency},
                     # it could be pphhpp2 for all that matter.                     

ConnectTo = 127.0.0.1:2005      # The host IP and port used by php
                                # This is the default IP and port php
                                # uses by default when installed on
                                # on windows                                

Extension = php                 # This one is obvious
}

##  In the above note the exact name of the php install folder is, PHP7
##  and how it ties in with FastCgIid = PHP7
##  It also has to be the same as in the, "UseFastCGI = PHP7" line like shown
##  in the mye107 virtual host entry, without the double quotes of course.
#
##  END OF COMMON GATEWAY INTERFACE (CGI) SETTINGS.

# SECOND,
# Add the url tool kit below to the appropriate section
# in your hiawatha.conf file, just copy and paste it in.
# The tool kit is required so hiawathat knows what files to
# protect, rewrite and serve, it does the same job as a .htaccess
# file would when using Apache.

## e107 Toolkit entry from my hiawatha.conf,

UrlToolkit {
  ToolkitID = e107
  Match ^/media\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ Rewrite /thumb.php?src=e_MEDIA_IMAGE/$5&$1w=$2&$3h=$4
  Match ^/media\/avatar\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ Rewrite /thumb.php?src=e_AVATAR/$5&$1w=$2&$3h=$4
  Match ^/media\/img\/([-A-Za-z0-9+/]*={0,3})\.(jpg|gif|png)?$ Rewrite /thumb.php?id=$1
  Match ^/theme\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ Rewrite /thumb.php?src=e_THEME/$5&$1w=$2&$3h=$4
  Match ^/(e107_images|e107_files)/ Return
  RequestURI exists Return
  Match .* Rewrite /index.php
}
#
##  END OF e107 UrlToolkit entry.

# THIRD,
# Add the virtual host entry for the site, mye107
# to do this we put our site details between two
# curly barackets, {} like shown below.
# On a side note, if your mye107 site is to be your main site,
# you would enter the same details as below into the appropriate
# section of your hiawatha.cof file, though you would also need to alter
# the first line in the example below, as it is for a virtual host and
# as such would open by typing mye107.127.0.0.1 in a browser, which is not
# what you would want in a one site set up such as, e107.127.0.0.1
# I have now added an example host entry at the bottom of the page,
# though keep in mind this example mye107 site is set up below as a
# virtual host, I suggest following this example, then all you need to do
# to make mye107 your main site is alter edit the example host at the bottom
# of this page and paste its content into the default site section of your
# hiawatha.conf file, and comment out the virtual host entry.

## mye107 virtual host entry from my hiawatha.conf,

VirtualHost {

Hostname = mye107.127.0.0.1, *.mye107.127.0.0.1
WebsiteRoot = C:\Program Files\Hiawatha\mye107
StartFile = index.php
TimeForCGI = 30
UseFastCGI = PHP7
UseToolkit = e107

}
#
##  END OF mye107 VirtualHost entry.

##!!!! FOURTH,
##!!!! EDIT YOUR WINDOWS HOSTS FILE AS EXPLAINED BELOW,
##!!!! IF YOU DO NOT DO THIS YOUR SITE WILL NOT SHOW IN YOUR BROWSER.

##  BELOW IS A COPY OF A WORKING windows hosts file.
##  IT DOES NOT AND SHOULD NOT BE HERE, other than as a quick refference so
##  you can set up sites on your local computer AND GET THEM TO ACTUALLY OPEN.

##  Start of windows hosts file,

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
## Remove it completely from this hiawath.conf file when you are happy
## your own windows hosts file is set up, the below is only an example,
## for you to work out the settings you require for your site 's.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

## The five example lines below need to be uncommented if you were to
## use them, they were commented out so hiawathat does
## not see them, they are only added here as an example of how to add site entries
## in a Windows hosts file, such entries need to be added or your site wont open.
## All other (#)'s in this examples hosts file need to be left alone, so
## neither hiawatha or windows acts upon the text they are commenting out.
## I would advise removing this example windows hosts file when you are finished
## setting up your own windows host file, hiawatha certainly does not need any of
## it to be here, the hosts file is so windows can resolve your sites to the ip address
## under which they are hosted, in the below examples its the local computers IP, 127.0.0.1
## Of the sites listed below we would write the last entry into our windows hosts file,
## to ensure our mye107 site will open when we type,
## mye107.127.0.0.1 in our browser.
##
#127.0.0.1 bookings.127.0.0.1
#127.0.0.1 test1.127.0.0.1
#127.0.0.1 b.127.0.0.1
#127.0.0.1 t.127.0.0.1
#127.0.0.1 mye107.127.0.0.1
#
#All the above is from a working windows hosts file, C:\Windows\System32\drivers\etc\hosts

## End of, windows hosts file entry examples.
#
#
### BELOW IS A HOST ENTRY AS OPPOSED TO THE VIRTUAL HOST EXAMPLE USED ABOVE.
VirtualHost {
        Hostname = www.telicubes.com
        WebsiteRoot = /var/www/wordpress_telecubes
#       DirectoryPath = /var/www/wordpress_telecubes
        StartFile = index.php
        AccessLogFile = /var/log/hiawatha/word_access.log
        ErrorLogFile = /var/log/hiawatha/word_error.log
        EnablePathInfo = yes
        TimeForCGI = 6
        UseFastCGI = PHP5
        UseToolkit = wordpress
}
# Regards, john
asked in Installation by (24 points) 1 1
edited by

Please log in or register to answer this question.

Welcome to e107 Q&A, where you can ask questions and receive answers from other members of the e107 community.
797 questions
1,202 answers
2,068 comments
939 users