Developers.TestingEnvironment.Server.HTTP

From Shareaza Wiki
Revision as of 23:41, 27 August 2010 by Old death (talk | contribs) (Added small notice: Note that only structural updates have been made. The content itself has not been checked for correctness.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  Translation

Do not translate this page into other languages. It is either low priority, too specific or incomplete.

e
  Updated:

This page has been updated on 2010-08-28 for the release of Shareaza v2.x.x.x. Note that only structural updates have been made. The content itself has not been checked for correctness.

e

Setting up a HTTP server

If you want to install an HTTP server, I recommend using Apache2 from Apache.org. More comprehensive instructions should be posted to this page later about how to download and install the server (or links to pages that do); but Apache.org has very comprehensive help documentation.

If you want to take a hand at installing PHP, MySQL, and Perl in conjunction with an Apache server, check out this article at programmerworld.net for detailed (and slightly outdated) instructions on how you might go about doing that. (Can someone post a better article in place of this reference? :) )

Installing PHP5

If you want to install PHP5, I recommend downloading the .ZIP package from PHP.net that includes all of the extra modules. You will probably want these modules later, so you might as well install them now. The binary installer does not include these extras yet. Go figure. The .ZIP package contains instructions about how to add lines to your Apache configuration to make it work. I have used the following additional .conf file as an include to configure use of PHP (assuming PHP is installed to C:/php):

[code phpinit.conf]

##################################
# PHP Type Declarations (Common) #
##################################

AddType application/x-httpd-php .php .php5 .php4 .php3

DirectoryIndex index.html index.html.var index.htm index.htm.var index.php default.html default.html.var default.htm default.htm.var default.php

#########################
# Configure PHP for CGI #
# (Vulnerable to Attack)#
#########################

#ScriptAlias /php/ "c:/php/"

# For PHP 4
#Action application/x-httpd-php "/php/php.exe"

# For PHP 5
#Action application/x-httpd-php "/php/php-cgi.exe"

##################################
# Configure PHP as Apache Module #
##################################

# Configure the path to php.ini
PHPIniDir "C:/php"

# ... or this line ...
#SetEnv PHPRC "C:/php"

# For PHP 4
#LoadModule php4_module "c:/php/php4apache2.dll"

# For PHP 5
LoadModule php5_module "c:/php/php5apache2.dll"

This .conf file adds an alias to a dedicated php directory if you want to place scripts in an isolated environment (perhaps with execution privelages or away from your website or system drive).

[code phpalias.conf]

Alias /cgi-bin/php "C:/isolated/php"

<Location /cgi-bin/php>
#  Options 
</Location>



Navigation:     ShareazaWiki > Developers.TestingEnvironment > Developers.TestingEnvironment.Server.HTTP