Mini Servers: Apache 2.2.9 Perl 5.10 Portable: Difference between revisions

Jump to navigation Jump to search
(New page: {{Uc nav mini servers}} Apache 2.2.9|right'''Mini server using Apache 2.2.9 and Activestate Perl 5.10 Core''' This mini server packs a real punch; trouble is it a...)
 
mNo edit summary
Line 1: Line 1:
{{Uc nav mini servers}}
{{Uc nav mini servers}}
[[Image:Uc_mini_3a.gif|Apache 2.2.9|right]]'''Mini server using Apache 2.2.9 and Activestate Perl 5.10 Core'''
[[Image:Uc_mini_3a.gif|Apache 2.2.9 Perl 5.10|right]]'''Mini Server 9 using Apache 2.2.9 and Activestate Perl 5.10 Core'''


This mini server packs a real punch; trouble is it also packs a real disk hit, using the full version of Perl you are looking at 53M hence I have used only the core and few modules reducing the server to about 3MB. It still provides usful features for dynamic pages adding a Perl core greatly extends the server's power.
This mini server packs a real punch; trouble is it also packs a real disk hit, using the full version of Perl you are looking at 53M hence I have used only the core and few modules reducing the server to about 3MB. It still provides usful features for dynamic pages adding a Perl core greatly extends the server's power.


Note: Check the support files section for download details.
Note: Check the [[#Support files|support files]] section for download details.


== Security ==
== Security ==
Line 30: Line 30:
== Configuring Apache ==
== Configuring Apache ==
Using the configuration file from [[Mini Servers: Apache 2.2.9 Portable|server 1]] very few changes are required however a new section is required to implement a safe location for CGI scripts. I have highlighted the changes and new section in bold.
Using the configuration file from [[Mini Servers: Apache 2.2.9 Portable|server 1]] very few changes are required however a new section is required to implement a safe location for CGI scripts. I have highlighted the changes and new section in bold.
   
 
Note: I have moved the server to port 8089 prevents clashing with other servers.  
{|border="0" cellpadding="4" cellspacing="1" style="background:#222222"
{|border="0" cellpadding="4" cellspacing="1" style="background:#222222"
|-style="background:#e8e8e8"
|-style="background:#e8e8e8"
Line 37: Line 38:
|-style="background:#f5f5f5"
|-style="background:#f5f5f5"
|
|
<nowiki>#</nowiki> UniCenter - Very basic server<br>
<nowiki>#</nowiki> File name: http.conf<br>
<nowiki>#</nowiki> Author: Mike Gleaves <br>
<nowiki>#</nowiki> Created By: The Uniform Server Development Team<br>
<nowiki>#</nowiki> Edited Last By: Mike Gleaves (ric) <br>
<nowiki>#</nowiki> Main Apache 2.2.9 HTTP server configuration file.<br>
<nowiki>#</nowiki> Main Apache 2.2.9 HTTP server configuration file.<br>
<nowiki>#</nowiki> 15-7-2008
<nowiki>#</nowiki> Supports Perl<br>
<nowiki>#</nowiki> V 1.0 16-7-2008
|
|
&nbsp;
&nbsp;
Line 66: Line 69:
<nowiki>#</nowiki> Basic settings <br>
<nowiki>#</nowiki> Basic settings <br>
<nowiki>#</nowiki> ======================================== <br>
<nowiki>#</nowiki> ======================================== <br>
&nbsp;Listen 80 <br>
&nbsp;'''Listen 8089''' <br>
&nbsp;ServerName localhost:80<br>
&nbsp;'''ServerName localhost:8089'''<br>
&nbsp;ServerAdmin fred@www.somedomain.com <br>
&nbsp;ServerAdmin fred@www.somedomain.com <br>
&nbsp;UseCanonicalName Off <br>
&nbsp;UseCanonicalName Off <br>
Line 168: Line 171:


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
== Perl - Core ==
== Perl - Core ==
Although our mini server only uses the Perl core you need to download the full package to extract it. (OK I have included a core in the support files) Check the Activestate site and download any newer version this allows you to install any libraries you require. On the other hand perhaps you want to run an earlier version of Perl. The following outlines how to install Perl on our mini server.
Although our mini server only uses the Perl core you need to download the full package to extract it. (OK I have included a core in the support files) Check the Activestate site and download any newer version this allows you to install any libraries you require. On the other hand perhaps you want to run an earlier version of Perl. The following outlines how to install Perl on our mini server.
Line 175: Line 179:


* The mini servers use ''' ActivePerl-5.10.0.1003-MSWin32-x86-285500.zip''' downloadable from [http://downloads.activestate.com/ActivePerl/Windows/5.10/ Activestate download page].
* The mini servers use ''' ActivePerl-5.10.0.1003-MSWin32-x86-285500.zip''' downloadable from [http://downloads.activestate.com/ActivePerl/Windows/5.10/ Activestate download page].
* After downloading unzip to any folder, locate the files '''perl.exe''' and '''perl510.dll''' copy them to the mini server folder '''<nowiki>*</nowiki>\uc_server_3a\udrive\usr\bin'''
* After downloading unzip to any folder, locate the files '''perl.exe''' and '''perl510.dll''' copy them to the mini server folder '''<nowiki>*</nowiki>\mini_server_9\udrive\usr\bin'''
* Create a new folder <nowiki>*</nowiki>'''\uc_server_3a\udrive\usr\lib''' and add libraries as required. (I have included a small number of library elements in the support files)
* Create a new folder <nowiki>*</nowiki>'''\mini_server_9\udrive\usr\lib''' and add libraries as required. (I have included a small number of library elements in the support files)


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 185: Line 189:
'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
=== Testing ===
=== Testing ===
Double click on uc_server_start.bat and check the server runs.
Double click on '''server_start.bat''' and check the server runs.
 
Type <nowiki>http://localhost:8089</nowiki> into your browser address bar.


=== Security ===
=== Security ===
Line 205: Line 211:


=== Download ===
=== Download ===
Download this server from the mini server's [[Mini Servers: Support and download#UC Server 3a|Support and download page.]] Save the file uc_server_3a.exe to any folder of your choice.
Download this server from SourceForge [http://sourceforge.net/projects/miniserver Project Page] save the file '''mini_server_9.exe''' to any folder of your choice.


'''''Note'':''' Check the file's integrity using its MD5 a suitable checker '''winMd5Sum Portable''' can be found at [http://portableapps.com/apps Portable Apps] under Utilities.
'''''Note'':''' Check out the mini server's [[Mini Servers: Support and download|support and download page]] detailing how to obtain full binaries for Apache and Perl.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''


=== Extract files ===
=== Extract files ===
Double click on uc_server_3a.exe, starts the extraction process.
Double click on mini_server_9.exe, starts the extraction process.


No need to change the folder destination, click extract, this creates a new folder '''uc_server_3a''' containing the following:
No need to change the folder destination, click extract, this creates a new folder '''mini_server_9''' containing the following:
{|
{|
|-
|-
Line 220: Line 226:
{|cellpadding="2"
{|cellpadding="2"
|-
|-
|valign="top"|'''Top level folder'''||uc_server_3a contains two files:<br>1) '''uc_server_start.bat''' - Double click to start the<br>2) '''uc_server_stop.bat''' - Double click to stop server
|valign="top"|'''Top level folder'''||mini_server_9 contains two files:<br>1) '''server_start.bat''' - Double click to start the<br>2) '''server_stop.bat''' - Double click to stop server
|-
|-
|'''cgi-bin folder:'''||Contains demo scripts and single page web site.
|'''cgi-bin folder:'''||Contains demo scripts and single page web site.
Line 236: Line 242:
|'''www folder:'''||This is where you put your web site or sites
|'''www folder:'''||This is where you put your web site or sites
|-
|-
|valign="top"|'''Test sites:'''||mpg1 and mpg2 are test sites these are included to<br>
|valign="top"|'''Test sites:'''||test1 and test2 are test sites these are included to<br>
provide an idea of the servers capability's. Delete these folders and<br>
provide an idea of the servers capability's. Delete these folders and<br>
copy your sites into this folder (Referred to as the document root folder)
copy your sites into this folder (Referred to as the document root folder)
|}
|}
|
|
[[Image:Uc_server_3a_dir.gif]]
[[Image:Uc_mini_server_9_dir.gif]]
|}
|}


Line 251: Line 257:
Testing is straight forward.
Testing is straight forward.


# Start the server by double clicking on '''uc_server_start.bat''' (Creates a virtual drive "w" to run the server on)
# Start the server by double clicking on '''server_start.bat''' (automatically detects free drive letter creates new virtual drive and runs the server.)  
# Start a web browser.
# Start a web browser.
# Type '''<nowiki>http://localhost/</nowiki>''' into the browser address bar.
# Type '''<nowiki>http://localhost:8089/</nowiki>''' into the browser address bar.
# An index page is displayed, check out the test site '''MPG1''','''MPG2''' (Perl single page web site).
# An index page is displayed, check out the test site '''test1''','''test2''' (Perl single page web site).
# Stop the server by double clicking on '''uc_server_stop.bat'''
# Stop the server by double clicking on '''server_stop.bat'''
 
'''''Note'':''' If you need to change the virtual drive letter open file uc_server_start.bat locate this line:
 
'''if "%Disk%"=="" set Disk=w''' and change the drive letter from '''w''' to one that is not being used.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''


=== Your web site ===
=== Your web site ===
Open the folder www located in folder '''*uc_server_3a\udrive\www''' (Note * is the path to the folder you extracted the server files) delete everything in '''www''' and copy your site into it.
Open the folder www located in folder '''*mini_server_9\udrive\www''' (Note * is the path to the folder you extracted the server files) delete everything in '''www''' and copy your site into it.


'''''Note'':''' Make sure one of your pages in folder www is named '''index.html''' or '''index.htm''', otherwise you will need to type a page name in every time to access your site.
'''''Note'':''' Make sure one of your pages in folder www is named '''index.html''' or '''index.htm''', otherwise you will need to type a page name in every time to access your site.


e.g. <nowiki>http://localhost/somepage.html</nowiki>
e.g. <nowiki>http://localhost:8089/somepage.html</nowiki>


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 279: Line 281:
* Reference Unix: '''<nowiki>#!/usr/bin/perl</nowiki>'''
* Reference Unix: '''<nowiki>#!/usr/bin/perl</nowiki>'''
* Mini Portable Server: '''<nowiki>#!/usr/bin/perl</nowiki>'''
* Mini Portable Server: '''<nowiki>#!/usr/bin/perl</nowiki>'''
* Mini Server run as service: '''<nowiki>#!c:/uc_server_3b/usr/bin/perl</nowiki>'''
* Mini Server run as service: '''<nowiki>#!c:/mini_server_10/usr/bin/perl</nowiki>'''


'''''Note'':''' If you use the Unix "shebang" on a mini server installed as a service you will receive this error message in  
'''''Note'':''' If you use the Unix "shebang" on a mini server installed as a service you will receive this error message in  


Apache's error log: '''(OS 3) The system cannot find the path specified'''
Apache's error log: '''(OS 3) The system cannot find the path specified'''
'''''[[#top | Top]]'''''
== Change Virtual Drive ==
The server automatically detects the first free drive letter and uses that to run the server on.
You can override this in one of two ways:
# Start the server using a drive parameter for example: '''server_start.bat z''' this forces the server to use drive z
# Edit server_start.bat, locate the following line:<br>&nbsp;&nbsp;'''rem set Disk=w''' <br>Remove the rem and replace w with the letter you want to use for example:<br>&nbsp;&nbsp;'''set Disk=x'''&nbsp; Forces the server to use drive letter x
'''''[[#top | Top]]'''''
== Change server default port ==
*Open file: '''httpd.conf''' (Located in folder: \mini_server_9\udrive\usr\local\apache2\conf)
*Locate the lines:<br>Listen 8089<br>ServerName localhost:8089<br>
*Change to:<br>Listen 8080<br>ServerName localhost:8080
This moves the server to the standard secondary web server port
'''''Note'':''' Type '''<nowiki>http://localhost:8080</nowiki>''' into a browser to view the site.
If port already in use try any value above 2000
'''''[[#top | Top]]'''''
== Multi Servers ==
If you wish to run several mini servers at the same time create a new folder for each server and copy contents of mini_server_9 into each of these.
Change the server port for each server to be unique. The servers may be started in any order.
'''''Note'':''' You can run the mini servers alongside Uniform Server 3.5-Apollo however you must start Uniform Server first.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 300: Line 333:


{|
{|
| [[Image:uc_small_logo.gif]] || [[User:Ric|Ric]]
| [[Image:Uc_small_logo.gif]] || [[User:Ric|Ric]]
|}
|}


Line 306: Line 339:
[[Category: UniCenter]]
[[Category: UniCenter]]
[[Category: Mini Servers]]
[[Category: Mini Servers]]
[[Category: Perl]]
[[Category: Oily Rag]]
[[Category: Oily Rag]]
[[Category: Self Install]]
[[Category: Self Install]]