Download presentation
Presentation is loading. Please wait.
Published byMarion Lang Modified over 9 years ago
1
WAMP Windows Apache MySQL and PHP i.e. “WAMP”
2
Why WAMP? WampServer is a Windows web development environment. It allows you to create and test web pages and applications using a local server: Apache2. It also handles server-side scripting: PHP and MySQL databases (alongside a database admin panel: PhpMyAdmin). You can test web pages (especially with PHP) safely before they go live, and as it saves you a lot of time in the long run. You can configure Dreamweaver Site with WAMP as the local testing server.
3
www.wampserver.com/en/ Download (use a reliable source! See header above) and install WAMP (normally install to C:\wamp directory). Read instructions carefully.
4
Completing installation
5
Look for the green WAMP logo/icon in the bottom right of the task bar area: If it is red or orange it is not working fully. To start either right click it or go to Start > Programs > WampServer > Start WampServer Open a web browser and type localhost, or left click the Wamp logo and click local host Check Server is running
6
Type the URL “http://localhost” You should see this in the web browser. This normally means the server is running properly. “Locahost” is the server name.
7
Add a project Navigate to the www folder in the WAMP folder on the C: drive, or where you installed it, e.g. C:\wamp\www To add a project, create a new folder (the name of the folder becomes the project, e.g. C:\wamp\www\pageboutique
8
Refresh locahost Your folder has been added to the list of projects. Place web pages in this folder. One file should be named index.html to act as the default homepage.
9
Wamp Settings Locate the file http.conf to change settings of the web server (Apache server). You edit it in Notepad, but always keep a back up of the original in case!
10
Changing WAMP settings Changing the WAMP settings may be useful later when you become more acquainted with the software, however you should be able to leave the settings as they are. Changing the settings is not recommended unless you make a backup of the settings files. The following example discusses how you can add additional host names such as client1, client2, etc. to the standard host name localhost In order to change some files, you may need to set permissions in security to do so
11
Example of WAMP Settings Say you are a freelance web designer using your laptop as a local development machine. You would like to create more than one virtual host for each client. You will need to modify 2 files. Here is an example how to do it (based on a Windows 32 bit OS). Use Notepad or a text editor to modify files. Create a back up of any modified files in case you need to revert back. You may need to access Permissions (Security settings to modify the hosts file) 1.Find the hosts file, e.g. in: c:\windows\system32\drivers\etc\ and modify the file hosts (see next slide) 2.Find and modify the Apache configuration file httpd.conf in: httpd.conf file:, e.g. (see following slides) C:\wamp\bin\apache\Apache2.4.4\conf
12
Change the hosts file The hosts files has entries which maps IP Address to a name. By default the name “localhost” is mapped to 127.0.0.1, e.g. 127.0.0.1 localhost Add additional entries to represent your clients/projects. You may use the name of the client as the mapping key, e.g. 127.0.0.1 client1.local 127.0.0.1 client2 127.0.0.1 client3etc. Add (using Notepad) as many entries as you want in the hosts file. Whenever you enter “client1” or “client2” in your web browser, windows will first look into hosts file and if it gets the corresponding entry, it sends the request to that IP Address. You may need to type http:// before client name
13
Change the httpd.conf file 1.Open the httpd.conf file and search (CTRL+F) for the line: DocumentRoot "c:/wamp/www“ Add the source code below under the line DocumentRoot “c :/wamp/www” (assuming your clients are called client1 and client2 and there is a client1 and client2 folder in the WAMP www folder NameVirtualHost 127.0.0.1 ServerName localhost DocumentRoot 'C:\wamp\www' ServerName client1 DocumentRoot 'C:\wamp\www\client1' ServerName client2 DocumentRoot 'C:\wamp\www\client2'
14
Restart WAMP When making changes to the system files http.conf and hosts, you need to restart the WAMP server. Left click the green WAMP icon in the taskbar and select Restart all Services. Test the new local server addresses.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.