APPSERV
SETTING UP APPSERV PACKAGES - APACHE WEB SERVER LEARNING OUTCOMES: By the end of this lab session, students should be able to: • •
Setting Up AppServe Software Package. Using appserv-win32-2.5.10 software package and doing site configuration. Manages Site in Macromedia Dreamweaver or NotePad2.exe.
ACTIVITY 1A: SETTING APPSERV SOFTWARE Procedures: 1. Double click on appserv-win32-2.5.10.exe or download the latest version through http://www.appservnetwork.com/ website. 2. Follow the steps below:
a) Click Next button to start your configuration.
b) And choose I Agree button to continue.
Prepared By :
[email protected]
1
APPSERV
c) Click Next to continue the installation.
d) Check all the components and click Next to continue.
e) Enter the Server Name and email. Write localhost as Server Name and lets Apache HTTP Port as 80.
Prepared By :
[email protected]
2
APPSERV
f) Enter root password for MySQL database and you will start your installation progress.
g) If your windows show this popup, just click Unblock button.
h) Now your installation completed. Click Finish and AppServe software already installed in your machine. 3. 4.
Check at Window > All Program > AppServe. So you can use all the services provided by AppServe Network. Testing your local server using http://127.0.0.1 or http://localhost
Prepared By :
[email protected]
3
APPSERV
Your first page of http://localhost/ or http://127.0.0.1
ACTIVITY 1B: SETTING UP THE SITE CONFIGURATION Procedures: Using httpd setting: 1. Create new folder and rename the folder to “Lab1”. All your web content will place here. 2. Place the folder to your C:\ drive. C:\Project\Lab1\web or at AppServ folder at C:\AppServ\www\Lab1\web 3. Then, open the httpd.conf to configure your site. Window > All Program > AppServ > Configuration Server > Apache Edit the httpd.conf Configuration File
Prepared By :
[email protected]
4
APPSERV
4. 5.
Then the httpd.conf will display and you can configure your Apache local server. Open using Notepad2.exe
6.
Then, scroll down the httpd.conf file and place the codes below. AddType application/x-httpd-php .php .html .htm
Application allowed in site
Virtual Host port *:80 codes
ServerAdmin [email protected] DocumentRoot "C:/AppServ/www/" ServerName localhost ErrorLog logs/local.error.log CustomLog logs/local.access.log common
Options FollowSymLinks AllowOverride All
Basic directory codes
Order allow,deny Allow from all
Project name http://localhost/lab1
Alias /lab1 "C:/Project/Lab1/web" Options FollowSymLinks MultiViews AllowOverride None
End of virtual host
Prepared By :
[email protected]
Project directory
5
APPSERV
7. 8. 9.
Then, save the httpd.conf file. Restart your Apache server. Click Window > All Program > AppServ > Control Server by Service > Apache Restart. Then testing your configuration. http://localhost/lab1 or http://127.0.0.1/lab1
ACTIVITY 1C: SETTING UP DATABASE ADMINISTRATION SITE : phpmyadmin
WHAT IS PHPMYADMIN??? PhpMyAdmin is phpMyAdmin is an open source tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows. Executing SQL statements or managing users and permissions.
Procedures: 1. 2. 3.
AppServ already installed a full package of your database administration tools phpmyadmin. Phpmyadmin was installed at C:\AppServ\www\phpMyAdmin. To test your phpmyadmin tools, browse the tools using your web browser to http://localhost/phpmyadmin/ The popup below will appear. You need to enter the username: root and password: the password that you enter at the beginning of installation. Let say the password is admin. And click OK.
http://localhost/phpmyadmin interface.
Prepared By :
[email protected]
6
APPSERV
4. 5.
If the link can’t work properly, do the server configuration for phpmyadmin. Follow the direction below: a. Open the httpd.conf to configure your site. Window > All Program > AppServ > Configuration Server > Apache Edit the httpd.conf Configuration File b. Then, scroll down the httpd.conf files, and write the codes below: Local phpmyadmin link name Alias /phpmyadmin " C:/AppServ/www/phpMyAdmin"
Options FollowSymLinks MultiViews AllowOverride None
6.
PhpMyAdmin directory
c. Save the files and restart your Apache server. When your local server restarted, then your http://localhost/phpmyadmin phpmyadmin tools can work properly.
ACTIVITY 1D: DISPLAY YOUR FIRST DYNAMIC WEB PAGE WHAT IS DYNAMIC WEB PAGE??? A dynamic web page is a hypertext document rendered to a World Wide Web user presenting content that has been customized or actualized for each individual viewing or rendition or that continually updates information as the page is displayed to the user
Procedures: 1. 2. 3. 4.
Set your local site as activity 1B. Let say your local site is http://localhost/lab2/ In your project folder C:/Project/Lab2/web, create single php files. You can using any web authoring tools likes Macromedia Dreamweaver, Microsoft FrontPage or Notepad. If you using Notepad2.exe, open the file and type in the codes below:
Lab 1 – My First Dynamic Webpage
5.
Save your file and view your page in the browser.
Prepared By :
[email protected]
7
APPSERV
EXERCISE: 1. Create one (1) site name MyRestaurant by follow the step above. To test your site is well develop, print “Welcome to my The Tarik Restaurant!”on your main page. Then insert dynamic date using php command in your page.
NOTES: __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________
Prepared By :
[email protected]
8