
Installation and setup of Apache web server in MS Windows operating systemThis is a manual on how to download and install an Apache on your personal computer for personal use. It is NOT optimized for security (!!!) nor effectivness; only to have a working web server as easy as possible. Later it is specified how to use Apache in combination with database system MySQL and programming languages PHP or Perl. You can use Apache also without these programs, or with other programs. Downloading installersOn the Apache server homepage (httpd.apache.org) in the left menu click On the MySQL databse homepage (www.mysql.com) in the top menu click On the PHP language homepage (www.php.net) click in the top menu on On the Perl language homepage (www.activestate.com) on the right menu at Run the downloaded installers; first Apache, then the remaining ones in any order. Setting up Apache web serverWeb server has the web pages stored in some local directory, and after typing an address in the web browser, these pages are returned.
By default server uses directory Apache settings are in file Find the line: Listen 80 This is the number of port where the server is DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" This is a directory where you will create web pages. You can change it for example to: DocumentRoot "C:/www" Now find the place where begins the list of properties of that directory: <Directory "C:/Program Files/Apache Group/Apache2/htdocs"> According to the value of <Directory "C:/www"> Save the configuration file (we will continue to using it later), and start or restart the Apache server.
In directory <h1>My home intranet</h1> Start the web server and type an address: http://localhost/ If the Apache server is listening on some other than standard port (80), use also the port number: http://localhost:81/ If everything is correct, you should see a page with heading Using the PHP programming language in Apache serverAgain, opent he configuration file ScriptAlias /php/ C:/PHP/ Next, find AddType application/x-httpd-php .php Finally, find the section with Action application/x-httpd-php /php/php-cgi.exe These lines suppose that your PHP programming language interpreter is installed in a directory Restart Apache, and in directory <? echo 2+2; ?> In the web browser, enter the address: http://localhost/test.php If everything is OK, you should see a number Using the Perl programming language in Apache serverOpen the configuration file Options Indexes FollowSymLinks Add an option Options Indexes FollowSymLinks ExecCGI Now find a part of configuration file where is AddHandler cgi-script .cgi AddHandler cgi-script .pl Restart Apache, and in directory #!C:\Perl\bin\perl.exe print "Content-type: text/html\n"; print "\n"; print "OK"; In the web browser, display the following address: http://localhost/test.pl If everything is OK, the |
Viliam Búr [sk] domáca stránka (feed) viliam@bur.sk ICQ: 133571943 Blog: I am teaching since February (2) Links: Sponsored links: |