Wrench value from your Creo Investments Home Measure the benefits Simple Automation can bring Why
A personal way to do PDM Peer to Peer
3D Drawings Model Based
Smooth out unwanted sharp edges Other
www.proetoolbox.co.uk - Simple Automation made Simple

Setting up an Web-Server on your Intranet

Assuming you've made the choice to use a web-server and associated technologies to serve your Pro/Web.Link applications, you're probably wondering how easy the process of installing the associated software actually is. Most Pro/Web.Link applications are served to client computers within an internal network. Setting up the tools to do this is extremely straightforward and is the subject of this brief article.

The process is very simple and can be summarised as.

  • Get a machine.
  • Install Apache HTTP Server.
  • OPTIONAL: Install PHP (if you want to connect to databases).
  • OPTIONAL: Install MySQL (if you want a database).

    Getting a machine

    The word 'server' strikes formality into the hearts of IT people everywhere. What I really mean is an old box (running windows XP) that has a basic amount of memory (256Mb+), a reasonable disk (2Gb+ Free) and a 100Mb+ Network card. If you feel the apps are extremely commercially important (i.e. if you can't live without them for two days) then consider actually storing your data on one of the companies secure storage areas (area which has redundant backup). The web server will then serve the data from the storage area to the users. I suggest you don't go overboard with this.

    Install a HTTP Server (aka a Web Server)

    The Apache Server Project Logo

    Unfortunately this step will strike fear into your IT department's hearts (the thought of engineers running their own web server). The installation is actually really straight forward and, provided your companies IT department has a suitably configured 'firewall' there are few security problems to worry about. Of course certain industries and companies are more cautious than others. I'm going to assume that you'll very easily know in which category you sit in for this step!

    Download Apache Dialog

    First go and download Apache (MSI Installer ~5Mb) from the Apache HTTP Server Project web pages. The *.msi file is a single Microsoft Installer file, which contains a ready-to-run version of Apache. Note that this article was written around Apache HTTP Server 2.2.14. Information on other versions can be found at http://httpd.apache.org/download.cgi.

    Second, double-click to run the Apache *.msi file. The installer will lead you through the following screens.


    Page 1

    Apache Installer Screen 1


    Page 2

    Apache Installer Screen 2

    You will need to accept the License agreement to proceed.


    Page 3

    Apache Installer Screen 3

    Have a peek at the text in here, it will give you a bit more background to Apache.


    Page 4

    Apache Installer Screen 4

    Network Domain: Enter the DNS domain in which your server is or will be registered in. For example, if your server's full DNS name is myservername.mainnetworkname.net, type mainnetworkname.net.

    Server Name: Your server's full DNS name. From the example above, myservername.mainnetworkname.net here.

    Admins Email Address.

    RECOMMENDED: Install Apache for All Users, on Port 80, as a Service. Apache will listen at port 80 for incoming traffic and it will run as a service (Apache will run even if no one is logged in on the server).


    Page 5

    Apache Installer Screen 5

    RECOMMENDED: Select Typical. This gives you everything you need for our purposes.


    Page 6

    Apache Installer Screen 6

    Where to install. The default path is C:\Program Files\Apache Group under which a directory called Apache2 will be created by default.


    Page 7

    Apache Installer Screen 7


    Page 8

    Apache Installer Screen 8

    During installation, the installer configures conf files to reflect the chosen install location. After the installation you should manually check to see what settings are in the httpd.conf file, and if necessary, update this configuration file. For example the default installation assumes pages are located in htdocs.

    Apache Resulting Installation Directory


    Apache Configuration File Location

    If you were going to make your server public, you'd probably want to set lots of other options in httpd.conf. However the files work as installed and inside a companies firewall, there is little to worry about.


    Apache Services

    Apache Monitor Windows Tray IconApache Service Monitor Application

    Apache installs an icon into the windows services tray. Clicking on it opens the Apache Service Monitor from which you can stop, start and restart the service as you wish.

    You will need to restart Apache should you make changes to the httpd.conf file.

    If you have to access network resources via Apache, it is recommended that you set up a seperate windows account with privileges to run the Apache Service. If you are storing your apps on a network drive that is backed up by your IT department then you'll likely want to do this.

  • Create a normal domain user account
  • Grant this user a privilege of Log on as a service and Act as part of the operating system.
  • Confirm that the account is a member of the Users group.
  • Grant the account read and execute (RX) rights to all document and script folders (htdocs and cgi-bin ).
  • Grant the account change (RWXD) rights to the Apache logs directory.
  • Grant the account read and execute (RX) rights to the Apache.exe binary executable.

    Testing the Installation

    Open http://localhost/ to test

    After starting, Apache listens for requests on port 80 (unless you altered the Listen directive in the configuration files). To connect to the server, launch a browser and enter http://localhost/ as the URL.

    Apaches default installation comes with a very simple default page that informs you whether it works. If nothing happens or you get an error, look in the error.log file in the logs subdirectory. If your host is not connected to the net, or if you have serious problems with your DNS (Domain Name Service) configuration, you may have to use instead.

    If you happen to be running Apache on an alternate port, you need to explicitly put that in the URL e.g. to properly connect with the server.



    It is very unusual for a default installation of Apache to fail to run. The most probably reason is that the user you are running with has insufficient user rights during the installation process. This article is not intended to be a de-facto reference for every eventuality of installation. If you have problems try the apache.org forums (or even ask your IT department for help).


    Next Steps

    You'll likely want to probably create a proper 'Engineering Home Page' and replace Apache default Index.html with your own before you unleash it on your Engineering users. The truth is a web-site without any content is kindof useless. Rest assured that it will take much longer to write down usefull information than it will to serve it up to the users. Be sure to give them quality to start with otherwise your experiment will be seen as a toy rather than a business tool.

    You may also decide to put the root htdocs folder somewhere else by changing the following line in the conf/httpd.conf file.

    DocumentRoot Apache Directive


    Install PHP

    PHP LogoAs with Apache HTTP Server, the installation is ridiculously easy. You have to be a bit more security conscious with PHP because it effectively could allow nasty folks to run commands that truly affect files on your server machine (if you accidently configure it to be wide open of course!). The configuration file (php.ini) is a little daunting but typical installations are fine with defaults.

    Download PHP Dialog

    First go and download PHP (MSI Installer ~22Mb) from the PHP for WindowsProject web pages. The *.msi file is a single Microsoft Installer file, which will happily install PHP. Because we're using Apache as the web server, download VC6 versions. This article is using PHP 5.3 (5.3.0), find information on other versions from http://php.net/index.php.

    Second, double-click to run the PHP *.msi file. The installer will lead you through the following screens.


    Page 1

    PHP Installer Screen 1


    Page 2

    PHP Installer Screen 2

    You'll have to accept the License Agreement.


    Page 3

    PHP Installer Screen 3

    Choose Installation directory.


    Page 4

    PHP Installer Screen 4

    Select to Install as an Apache 2.2.x Module.


    Page 5

    PHP Installer Screen 5

    Browse to the conf directory in the Apache installation.

    The installer will make the neccessary small changes to Apaches configuration ('httpd.conf') to enable PHP as a Module in Apache.


    Page 6

    PHP Installer Screen 6


    Page 7

    PHP Installer Screen 7


    Page 8

    PHP Installer Screen 8


    Page 9

    PHP Installer Screen 9

    All being well, the installation will take only a few minutes.


    Post Installation Testing

    All being well, the installation will take only a few minutes. To test the Installation is working following the following simple procedure.

    Simple PHP Test Program
  • Open a text editor (SciTE, Notepad++ or Windows Notepad).
  • Enter the following lines of PHP Code.
  • Save the file as 'Index.php' in your web server htdocs directory.
  • Open a browser and enter 'http://localhost/index.php' as the URL.
  • The page should look as per this image.

    PHP Test Program Rendered


    PHP Installation Directory

    The next step is to set up a valid configuration file for PHP ('php.ini'). You can find it in the PHP Installation directory. In my opinion the default settings in this file are perfectly fine for internal intranet use. If you have any reservations about this then take the time to read down the file. You'll find it to be carefully documented and even begineers can understand which features they are enabling/disabling. A couple of sample settings which are frequently altered to suit company situations are shown below. If you feel you want to write applications that upload Pro/E files to the server, then you'll want to up the setting controlling maximum upload size. You may also wish to change the temporary directory PHP uses for these uploads to the server.

    PHP Upload Max Filesize PHP Upload Temp Directory

    Install MySQL

    MySQL Logo

    Wow another ridiculously easy peice of yet-again-free software to install. While truthfully not as interesting as paint drying, databases are often the lifeblood of managers. Stick data in, query data to make reports out. If you're making apps that require databases, you'll probably want to liase with the IT folks about backups and so on. If you're just playing or learning then get it on and have some fun! I have yet to come across an Engineer who wants to write their own database enabled applications. Databases seem to be a level of complexity that crosses the boundary of comfort for most. My opinion is that you shouldn't attempt to write your own PDM system (PTC can supply you with a much better one) and instead perhaps consider only using the database functionality for centralising and serving data that may be in spreadsheet form currently.

    Download MySQL Dialog

    Anyway first go and download MySQL (MSI Installer ~101Mb) from the MySQL web pages. The *.msi file is a single Microsoft Installer file, which will happily install MySQL. This article is using MySQL 5.1.40, find information on other versions from http://dev.mysql.com/.

    Second, double-click to run the MySQL *.msi file. The installer will lead you through the following screens.


    Page 1

    MySQL Installation Screen 1


    Page 2

    MySQL Installation Screen 2

    Select Custom so you can choose to specify a different Installation location.


    Page 3

    MySQL Installation Screen 3


    Page 4

    MySQL Installation Screen 4

    Press Install!


    Page 5

    MySQL Installation Screen 5


    Page 6

    MySQL Installation Screen 6

    Flip past this information as you're not likely to be a database administrator if you're following my instructions!


    Page 7

    MySQL Installation Screen 7

    Choose to configure your server but I think it's unlikely you want to automatically receive updated software from SUN.


    Page 8

    MySQL Installation Screen 8


    Page 9

    MySQL Installation Screen 9

    Choose to execute a Standard Database configuration as you'll not be needing to be fancy with all your settings.


    Page 10

    MySQL Installation Screen 10

    Install as a Windows Service and pick to include MySQL in the PATH environment variable.


    Page 11

    MySQL Installation Screen 11

    Specify AND REMEMBER a password for your database. MySQL is a proper database, you have to know the password to gain entry into the data.


    Page 12

    MySQL Installation Screen 12


    Page 13

    MySQL Installation Screen 13


    Page 14

    MySQL Installation Screen 14


    Post Installation Testing

    All being well, the installation will take only a few minutes. To test the Installation is working simply log on and 'SHOW DATABASES':

  • From the installed Programs/MySQL menu, select MySQL Command Line Client.
  • Enter your password and press ENTER.
  • Type 'SHOW DATABASES;' and press ENTER.

    MySQL Command Line Client

    MySQL Installation Screen 1


    Proving MySQL is alive and well on your machine.

    Executing some simple SQL to prove MySQL is working


    While that won't solve any business problems for you yet, you now have a working MySQL server installed on your machine. All that's left is you think of an application and write it!



    Having a web-server provides a professional method of Application distribution. All updates to apps are instantaneously available to users in a controlled manner. Adding advanced dynamic modules to the server such as PHP and MySQL allows Simple Automation applications to add value in other dimensions (beyond direct User Experience). Installing a web-server takes minutes and a low spec machine will be perfectly capable of meeting even the typical needs of a medium sized department (30-50 people).