Installation and Configuration of Wamp Server

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Installation and

configuration of Wamp
Server
JFN – Institut of Technologie

Ivan Tchoffo, Cs Ing, Msc


September 2022
Wamp Server
• WampServer is a Windows web development
environment. It allows you to create web
applications with Apache2, PHP and a MySQL
database. Alongside, PhpMyAdmin allows you to
manage easily your databases
• WampServer installs automatically all you need to
start developing web applications and is very
intuitive to use. You will be able to tune your server
without even touching the setting files.
Wamp Server 3.2.6 fixtures
• Apache 2.4.51 – Web Server
• PHP 5.6.40/7.4.26/8.0.13/8.1.0 – PHP version support
timelines
• MySQL 5.7.36|8.0.27 – Database Server
• MariaDB 10.5.13|10.6.5 – Database Server
• PhpMyAdmin 4.9.7 & 5.1.1 – a free software tool written in
PHP, intended to handle the administration of MySQL over
the Web. It is a DataBase Management System (DBMS)
• Adminer 4.8.1 – a full-featured database management tool
written in PHP
• PhpSysInfo 3.3.4 – a customizable PHP script that displays
information about your system nicely · News
• PHP 7.0.33/7.1.33/7.2.34/7.3.30 (Optional) New version of
PHP
Installation and Configuration
• Create a folder were wamp will keep all his project

• Locate the wamp file and double-click on it to run the installation


process.
• Select the language and then press the OK button.
• Choose the I accept the agreement checkbox and then click the Next
button.
• Read the important information about WampServer installation and
click the Next button to proceed.
• Select a folder where you want to install the WAMP server and click the
Next button.
• You have to select the components that you want to install as shown in
the below screenshot. You can select all PHP versions and switch during
development. Also, you can install both MySQL and MariaDB.
Wamp configuration
• Select the shortcut for WampServer and click the
Next button.
• Click on the Install button to install WampServer.
• Now, select the default browser and default text
editor for the wamp server.
• Your installation is complete. Click the Finish button
to exit the Wamp Server installation wizard.
• Open your browser and type localhost for accessing
it. You will see below page.
Select component
WAMP Configuration
• Now, we will look into few configurations that help you during the development and testing of the web
applications. You can now start the WampServer by double-clicking on the shortcut WampServer icon on
your desktop.
• Services – You can see the options to start, stop and restart all services by left-clicking on the WampServer
icon.
• Change Database – Right-click on the WAMP icon to open the tools dialog box. Select Tools and click on
“Invert default DBMS MariaDB <-> MySQL”. Wamp Server will restart automatically and you can see the
default database by opening localhost in your browser.
• Change PHP Version – Right-click on the WAMP icon to open the tools dialog box. Select Tools and Change
PHP CLI version and click on the PHP version you want.
• Virtual Host – You can easily add a virtual host via the web interface of WampServer. Open localhost in your
browser and click on the “Add a Virtual Host” under the Tools section. Enter “Name of the virtual host like
dev.example.com” and enter the absolute path of the project. Click on the “Start the creation of
VirtualHost” button. Restart the Apache server to load the newly created virtual host.
• Change Apache Port – By default, the Apache web server runs on port 80. If you want to use a different
port for Apache, you can do it from the WampServer control Panel. Right-click on the WAMP icon to open
the tools dialog box. Select Tools and click on “Use a port other than 80”. Enter a new port number in the
dialog box and click on the Ok button.
• Change DBMS Port – By default, the database server runs on port 3306. If you want to use a different port
for the database server, you can do it from the WampServer control Panel. Right-click on the WAMP icon to
open the tools dialog box. Select Tools and click on “Use a port other than 3306”. Enter the new port
number in the dialog box and click on the Ok button.
• Empty Logs – WamServer provides functionality to clear logs from the control panel. You can empty logs
such as PHP error log, Apache error log, Apache access log, MySQL log, and MariaDB log. Even you can clear
all logs at once. Right-click on the WAMP icon to open the tools dialog box. Select Tools and select Empty
logs, you will find all options for removing logs.
• Change Language – You can language for WampServer control panel. Right-click on the WAMP icon to open
the tools dialog box. Select Language and click on the required language. You will see control panel in the
newly selected language.
Open your first Project
• Create a folder that will carried all your Project
• Create a virtual host on Wamp phpMyAdmin
• Create index file
• Refresh your browser
• Select the corresponding project on project
Create virtual Host
• Virtual hosting is the process of sharing the resources,
such as memory and processor cycles, among multiple
domain names on a single or a pool of servers, without
requiring all services provided to use the same
hostname.
• First and foremost, without a virtual host, it would be a
little tricky to mention the relative path throughout the
project. For instance, if you wanted to refer a link you
may do <a href=”/link”>Link</a>. This will redirect
you to “localhost/link” instead of
“localhost/project/link“.
Additionally, it makes easier to mimic subdomains as
there is no need for involving .htaccess to do so.
Web server
• The term web server can refer to hardware or software, or both
of them working together.
• On the hardware side, a web server is a computer that stores web
server software and a website's component files (for example,
HTML documents, images, CSS stylesheets, and JavaScript files). A
web server connects to the Internet and supports physical data
interchange with other devices connected to the web.
• On the software side, a web server includes several parts that
control how web users access hosted files. At a minimum, this is
an HTTP server. An HTTP server is software that
understands URLs (web addresses) and HTTP (the protocol your
browser uses to view webpages). An HTTP server can be accessed
through the domain names of the websites it stores, and it
delivers the content of these hosted websites to the end user's
device.
Steps in creating Virtual Host
• By adding details directly into the file
• Via Wamp localhost UI
Create a VHOST By adding details
directly into the file
1. Make sure httpd-vhosts.conf is included
• To confirm this, go to root wamp directory,
followed by bin ➜ apache ➜ apache.x.x.x ➜ conf
➜ httpd.conf file from that directory.
• Or C:\wamp64\bin\apache\apache2.4.35\conf on
cmp promt
• After opening the “httpd.conf” file search “vhosts“.
Then, find the line
Create a VHOST By adding details
directly into the file (2)
• ‘#‘ is removed at the start of the line.
Create a VHOST By adding details
directly into the file (3)
2. Add servername and root directory to httpd-vhosts.conf
Find httpd-vhosts.conf located at wamp64\bin\apache\apache2.4.35\conf\extra
Now, copy and paste the code provided below to the httpd-vhosts.conf file.
• # Noobietech
• <VirtualHost *:80>
• ServerName noobietech.local
• DocumentRoot "d:/wamp64/www/noobietech/public"
• <Directory "d:/wamp64/www/noobietech/public/">
• Options +Indexes +Includes +FollowSymLinks +MultiViews
• AllowOverride All
• Require local
• </Directory>
• </VirtualHost>
Create a VHOST By adding details
directly into the file (4)
3. Add servername to the hosts
• Next, you need to add the server name into the
windows hosts file. This hosts file is located at
“C:\Windows\System32\drivers\etc“. Open this
hosts file as an administrator and add the following
line to this hosts file.
• 127.0.0.1 noobietech.local
• 4. Restart all service or DNS of WAMP
• Lastly, you need to restart the DNS of the wamp
server. You can either left-click on the wamp server
icon and restart all services. Or you can right-click
on the wamp server ➜ Tools ➜ Restart DNS.
Create a VHOST Via WAMP UI
1) Include httpd-vhosts
• Firstly, check if httpd-vhosts is included in httpd.conf file. You can access
this file by left-clicking on the wamp icon ➜ apache ➜ httpd.conf.

ind the line and remove ‘#‘ if there is one at the beginning of the line
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Create a VHOST Via WAMP UI (2)
• 2) Enable VirtualHosts sub menu
• Next, on our mission to create a virtual host in wamp, we need to
enable VirtualHosts sub-menu. To enable this, right-click on the wamp server
icon ➜ wamp setting ➜ tick VirtualHosts sub-menu
Create a VHOST Via WAMP UI (3)
• 3) Add a new virtual hos
• Then, we need to add enter the desired server name like “sitename.local” or “sitename.dev“. Here,
you can give any suffixes, however, it is recommended not to give those names that conflict with the
real web address. And, also need to provide absolute address to create a virtual host in wamp
• To set up a new virtual host, left-click on the wamp server icon ➜ Your
VirtualHost ➜ VirtualHost Management
Create a VHOST Via WAMP UI (4)
• There you need to enter, server name, and the absolute path of the
dedicated project directory.

After that, just click on “Start the creation of the VirtualHost” This might take a
while and after that, it will notify about the successful creation of the virtual host
Create a VHOST Via WAMP UI (5)
• 4) Restart DNS server
You can either left-click on the wamp server icon and restart all services.
Or you can right-click on the wamp server ➜ Tools ➜ Restart DNS.
Delete a Virtual Host
• to delete a virtual host by using WAMP UI, you proceed as
follow
1- Left-click on the wamp server icon ➜ Your
VirtualHosts ➜ VirtualHost Management.
Delete a Virtual Host (2)
2- There you can find a button “Suppress VirtualHost
form“. Click on that button.
Delete a Virtual Host (3)
3- After clicking on the button, it will list all the available virtual host
server name. Just select the virtual host which you want to remove the
click on “Suppress VirtualHost“.

Just after clicking on that button, the virtual host will be gone forever. Isn’t that
so easy?

You might also like