[SOLVED] Apache Server Homework assignment. Easy to do, just follow the instructions and answer some questions. All needed files included.
Im trying to study for my Software Development course and I need some help to understand this question.
- Review the documentation on the Apache Module mod_rewrite at http://httpd.apache.org/docs/2.4/mod/mod_rewrite.html. Suppose you want to redirect all clients whose host name starts with “Brookhaven” to a home page of “brookhaven.html” and all others to a home page of “dcccd.html”. Show what your directives would look like in this scenario.
1.Show how you would create an html page with server side includes that displays the current date and time. Include the directives that need to be set in your config file.2.Configure virtual hosts “www.sales.com” and “www.marketing.com”. Again using SSI show how you would modify the html page used in part 1 to display the server name (www.sales.com or www.marketing.com). Include all the directives that need to be set in your config file.
1.Configure Apache for CGI and browse the example Perl script ex10_2.cgi to display the CGI environment variables. What are your configuration directives? You will need to install Perl. http://strawberryperl.com/. Show your results.2.Define a script log file in the Apache config file and add an error to the script ex10_2.cgi. What error message is recorded in the log file?
1. Download and install PHP (http://windows.php.net/download/) at C:PHP. I would recommend Ver. 7.3.11 with Apache 2.4. Rename the file at “C:PHPphp.ini-development” to “C:PHPphp.ini”.
2. Configure Apache to run PHP scripts by adding the following directives to your configuration file. – PHPIniDir C:/PHP – LoadModule php7_module “c:/php/php7apache2_4.dll”- AddHandler application/x-httpd-php .php – AddType application/x-httpd-php .php3. Download the file ex10_3.php and put it in your htdocs directory. Open the file from your browser. What do you see