Mini Servers: Apache 2.2.9 Portable: Difference between revisions

m
no edit summary
(New page: {{Uc nav mini servers}} Apache 2.2.9|right'''Mini server using Apache 2.2.9 Core''' A mini server with all the power of Apache and the portability of Uniform Serv...)
 
mNo edit summary
Line 1: Line 1:
{{Uc nav mini servers}}
{{Uc nav mini servers}}
[[Image:Uc_mini_1a.gif|Apache 2.2.9|right]]'''Mini server using Apache 2.2.9 Core'''
[[Image:Uc_mini_1a.gif|Apache 2.2.9|right]]'''Mini Server 1 uses Apache 2.2.9 Core'''


A mini server with all the power of Apache and the portability of Uniform Server what a mix, one very neat compact server. ([[#Support files |see support files for download]])
A mini server with all the power of Apache and the portability of Uniform Server what a mix, one very neat compact server. ([[#Support files |see support files for download]])
Line 19: Line 19:
* All unused modules shall be disabled.
* All unused modules shall be disabled.


The specification dictates using the minimum number of Apache (2.2.9) modules. You may be interested in the final disk size for such a solution, surprisingly its only 1.03MB for a server meeting our specification.
The specification dictates using the minimum number of Apache (2.2.9) modules. You may be interested in the final disk size for such a solution, surprisingly its only 1MB for a server meeting our specification.


Don’t be deceived by the size it is a fully functioning production server. I have removed the complexity highlighting security issues.
Don’t be deceived by the size! It is a fully functioning production server. I have removed complexity to highlight security issues.


Take the last line of the specification; it states only modules required shall be installed. This increases security because any unused but installed modules have the capability to interact with others. It requires only one security vulnerability in any one of these unused modules to put the whole system at risk. Knowing our functionality requirements allows a list of required modules to be prepared and to exclude all unused modules.
Take the last line of the specification; it states only modules required shall be installed. This increases security, any unused but installed modules have the capability to interact with others. It requires only one security vulnerability in any one of these unused modules to put the whole system at risk. Knowing our functionality requirements allows a list of required modules to be prepared and to exclude all unused modules.


In terms of security always ask the question do we need that module if not don’t install it. The same argument applies to any other software, if its not required uninstall it.
In terms of security always ask the question do we need that module if not don’t install it. The same argument applies to any other software, if its not required uninstall it.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
== Modules ==
== Modules ==
A complete list with a full description of Apache modules can be found here [http://httpd.apache.org/docs/2.2/mod/ Apache Docs] .
A complete list with a full description of Apache modules can be found here [http://httpd.apache.org/docs/2.2/mod/ Apache Docs] .
Modules we require are listed below, note the core module is part of the main binary (program) and loaded by default.
Modules we require are listed below, note the core module is part of the main binary (program) and loaded by default.


Highlighted in bold are separate modules these are loaded using Apache's configuration file.
Highlighted in bold are separate modules these are loaded using Apache's configuration file ''httpd.conf''.


{|border="0" cellpadding="4" cellspacing="1" style="background:#222222"
{|border="0" cellpadding="4" cellspacing="1" style="background:#222222"
Line 61: Line 62:


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
== Configuring Apache ==
== Configuring Apache ==
When starting Apache you supply it with the location and name of a configuration file this overrides the default location compiled into the program. Its common practice to name the file '''httpd.conf''' and place it in a sub-folder named '''conf'''.
When starting Apache you supply it with the location and name of a configuration file this overrides the default location compiled into the program. Its common practice to name the file '''httpd.conf''' and place it in a sub-folder named '''conf'''.
Line 74: Line 76:
|-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> 14-7-2008
<nowiki>#</nowiki> V 1.0 2-8-2008
|
|
General information a reminder for what the configuration is for.
General information a reminder for what the configuration is for.
Line 101: Line 104:
<nowiki>#</nowiki> Basic settings <br>
<nowiki>#</nowiki> Basic settings <br>
<nowiki>#</nowiki> ======================================== <br>
<nowiki>#</nowiki> ======================================== <br>
&nbsp;'''Listen 80''' <br>
&nbsp;'''Listen 8081''' <br>
&nbsp;'''ServerName localhost:80'''<br>
&nbsp;'''ServerName localhost:8081'''<br>
&nbsp;ServerAdmin fred@www.somedomain.com <br>
&nbsp;ServerAdmin fred@www.somedomain.com <br>
&nbsp;UseCanonicalName Off <br>
&nbsp;UseCanonicalName Off <br>
Line 211: Line 214:


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
== Support files ==
== Support files ==
Each mini server is complete and zipped into a single self-extracting archive file.
Each mini server is complete and zipped into a single self-extracting archive file.


=== Download ===
=== Download ===
Download this server from the mini server's [[Mini Servers: Support and download#UC Server 1a|Support and download page.]] Save the file uc_server_1a.exe to any folder of your choice.
Download this server from SourceForge [http://sourceforge.net/projects/miniserver Project Page] save the file '''mini_server_1.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.


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


=== Extract files ===
=== Extract files ===
Double click on uc_server_1a.exe, starts the extraction process. No need to change the folder destination, click extract, this creates a new folder '''uc_server_1a''' containing two files and one folder.
Double click on mini_server_1.exe, starts the extraction process. No need to change the folder destination, click extract, this creates a new folder '''mini_server_1''' containing two files and one folder.


# '''uc_server_start.bat''' - Double click to start the server
# '''server_start.bat''' - Double click to start the server
# '''uc_server_stop.bat''' - Double click to stop server
# '''server_stop.bat''' - Double click to stop server
# '''udrive''' - Folder containing server and your web site.
# '''udrive''' - Folder containing server and your web site.


Line 233: Line 237:
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:8081/</nowiki>''' into the browser address bar.
# An index page is displayed, check out the test site '''MPG1'''.
# An index page is displayed, check out the test site '''MPG1'''.
# Stop the server by double clicking on '''uc_server_stop.bat'''
# Stop the server by double clicking on '''server_stop.bat'''
 
'''''[[#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_1\udrive\usr\local\apache2\conf)
*Locate the lines:<br>Listen 8081<br>ServerName localhost:8081<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]]'''''


'''''Note'':''' If you need to change the virtual drive letter open file uc_server_start.bat locate this line:
== 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_1 into each of these.


'''if "%Disk%"=="" set Disk=w''' and change the drive letter from '''w''' to one that is not being used.
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]]'''''
=== Your web site ===
 
Open the folder www located in folder '''*uc_server_1a\udrive\www''' (Note * is the path to the folder you extracted the server files) delete everything in '''www''' and copy your site into it.
== Your web site ==
Open the folder www located in folder '''*mini_server_1\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:8081/somepage.html</nowiki>
 
'''''[[#top | Top]]'''''
 
== Putting the server on-line ==
If connected to the Internet by a router to put the server on-line you need to forward port 8081 (or the port you have chosen to run the server on).


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 256: Line 293:
Don’t be deceived by this mini server's size, remember its powered by Apache and very secure. For a quick test I loaded UniCenter and put the server on-line.
Don’t be deceived by this mini server's size, remember its powered by Apache and very secure. For a quick test I loaded UniCenter and put the server on-line.


I was surprised how fast it was. One final test I could not resist, dumped the entire server straight onto a USB memory stick and put that on-line. The speed was slightly slower, note I was using a cheapo memory stick. I was more than impressed with this dynamic duo Apache and Uniform Server make an excellent basic portable server.  
I was surprised how fast it was. One final test I could not resist, dumped the entire server straight onto a USB memory stick and put that on-line. The speed was slightly slower, note I was using a cheapo memory stick. I was more than impressed with this dynamic duo Apache and Uniform Server's method of portability make an excellent basic portable server.  


If you want a more permanent installation install the server as a service covered on [[Mini Servers: Apache 2.2.9 Service|the next page page]].


Perhaps you would like to protect the server with a name and password I cover this with [[Mini Servers: Apache 2.2.9 Portable - Authentication|Mini Server 3]].
'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''


Line 264: Line 304:


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


 
[[Category: To be published]]
[[Category: UniCenter]]
[[Category: UniCenter]]
[[Category: Mini Servers]]
[[Category: Mini Servers]]
[[Category: Oily Rag]]
[[Category: Oily Rag]]
[[Category: Self Install]]
[[Category: Self Install]]