Testing your Website using Apache Test Environment
Tags: manualtesting, testing, apache, beginners
Published: 2022-07-29 13:53:34

Launched in 1995, Apache Web Server has been the subject of discussion regarding the most popular web server on the internet. The name in itself is said to have rewritten history. Apache was derived from a very well-known Native American Indian Tribe who were feared and respected for their superior skills related to warfare strategy and everlasting durability.

## What is Apache Web Server?

The most widely used open-source, cross-platform web server is meant for hosting one or more HTTP-based websites. It is free to download and is considered to be a reliable platform by the majority of internet consumers on a global scale. By Nov 2013, it was responsible for running 67% of all web servers around the globe. Though right now, that popularity is steadily decreasing.

Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. Its official website→ httpd.apache.org

The software is available for the below-mentioned OS:

* Unix

* FreeBSD

* Linux

* Solaris

* Novell Netware

* OS X

* Microsoft Windows

* OS/2

* TPF

* OpenVMS

* eComStation

Key Features:

* Supports numerous programming languages.

* Provides an authentication mechanism for user log in.

* Facilitates Database Support.

* Supports Server Side Scripting.

With the gradual passage of time the popularity of Apache has been slowly fading. The major reason behind that is **Nginx**.

![](https://cdn-images-1.medium.com/max/2000/1*LHgEDTpqYRzyblBVrYg9Iw.png)

According to the above statistics presented by W3Techs.com it is notable that Nginx has developed an eminent place in the WWW.
Some popular sites using **Nginx** are:

* WordPress.com

* Pinterest.com

* 360.cn

* Twitch.tv

* Mail.ru

* Csdn.net

***Did you know? Online [Test Automation](https://www.lambdatest.com/automation-testing?utm_source=devto&utm_medium=organic&utm_campaign=jul29_rd&utm_term=rd&utm_content=webpage) Platform accelerates your release velocity with blazing fast test automation on the cloud.***

## Wondering about which web server are you using?

The answer to that lies on your website’s HTTP header. Although, it is not always visible.

You may view the website’s HTTP header by using the Network tab inside the Chrome Dev Tools or you can also go for tools like a Pingdom, GTmetrix, etc.

![](https://cdn-images-1.medium.com/max/2000/1*nA7w-69n9YB6kbo7cgvD-A.png)

This method is not feasible if you are using Cloudflare or any other similar service provider.

***Start testing your native mobile apps using our capable mobile app [emulators online](https://www.lambdatest.com/mobile-emulator-online?utm_source=devto&utm_medium=organic&utm_campaign=jul29_rd&utm_term=rd&utm_content=free_tools).***

## Fixated on using Apache? Then first setup local apache environment.

Service providers like XAMPP, LAMP, WAMP have made it all too easy to deploy an Apache web server for hosting your locally stored website.

Step 1 → Download XAMPP → https://www.apachefriends.org/download.html

Step 2 → Start the installation and provide a directory for the same.

Installation may take up a couple minutes. This is how it would look like once the setup is complete. Click Finish.

![](https://cdn-images-1.medium.com/max/2000/1*2InftMAcdeAByIk4AmjZgg.png)

Step 3 → You will get a window for selecting a language. Hit Save on your preferred one.

![](https://cdn-images-1.medium.com/max/2000/1*9ieh4HvOlAvVKMyaDRqZDQ.png)

Step 4 → After selecting a language, XAMPP would open up. You need to hit Start on Apache and that’s it! You will have Apache running.

![](https://cdn-images-1.medium.com/max/2000/1*qeuvvrYQ_9QQNsF1V8TPvg.png)

Step 5 → Go to your browser and type *http://127.0.0.1* or *http://localhost:80* to verify Apache web server hosting by XAMPP by visiting dashboard.

![](https://cdn-images-1.medium.com/max/2000/1*mGy6VT-zjZOOnFLmPJV-NQ.png)

## Local Hosting a Website through XAMPP

I will be demonstrating this with the help of Roadside template.

Step 1 → Head to the Roadside template’s link and download it.

![](https://cdn-images-1.medium.com/max/2000/1*-SOrF289eW_29g_X9uVr-Q.png)

Step 2 → Extract the download folder into XAMPP(root directory) → htdocs

![](https://cdn-images-1.medium.com/max/2000/1*QqdZeM_JaTJjpOUiRnkzdg.png)

Step 3 → Run Apache on XAMPP.

![](https://cdn-images-1.medium.com/max/2000/1*wFv-SWDG3v_3ncs8ix4aAQ.png)

Step 4 → Go to your browser and enter in the URL → **localhost/roadtrip**.

![](https://cdn-images-1.medium.com/max/2000/1*Ey0QOfubViyltfol2M6Ovw.png)

Note the reason I am mentioning roadtrip after localhost is because that is how I named the template’s folder in my htdocs. If you have come up with some other name say “roadtrip-template” then your URL would be → localhost/roadtrip-template.

Now that your website is hosted you can go on ahead and make changes into its source code using any text editor. Notepad++ and Sublime Text are my personal favourite.

To check the back-end functionality of your website then, you will have to start **MySQL** along with **Apache** under XAMPP Control Panel.

**If you are not willing to use XAMPP** then you can **download and install Apache from **Apache Lounge.

Step 1 — Once you are on the website, then download either 32-bit or 64-bit, depending upon your windows server setting.

![](https://cdn-images-1.medium.com/max/2000/1*qvAazS8lIPEIjEi0KVeDdQ.png)

I will be using a **Apache 2.4.34 Win64** for this tutorial.

Step 2 — Extract the downloaded zip file. Extract it in the location of your server.

Step 3 — Configuring Apache

* Locate the “httpd.conf” file and open it in any standard text editor.

* If you extracted Apache at any other directory than the default C:\Apache24 then you ought to update the configuration file accordingly.
ServerRoot C:/Apache24 → ServerRoot D:/Apache
DocumentRoot C:/Apache24/htdocs →DocumentRoot D:/Apache/htdocs
Directory C:/Apache24/htdocs> →Directory D:/Apache/htdocs
ScriptAlias /cgi-bin/ C:/Apache24/cgi-bin/ → ScriptAlias /cgi-bin/ D:/Apache/cgi-bin/

* You would also need make the following modification in the configuration file.

* Options Indexes FollowSymLinks →Options Indexes FollowSymLinks ExecCGI

* Remove the # symbol at the start of this line to uncomment: AddHandler cgi-script .cgi

* Also add the line, AddHandler cgi-script .pl

* At the End of File you must add this line ScriptInterpreterSource Registry

* 

Step 4 — Launch Apache by going into the extracted directory. → Apache → Bin → Open Powershell here or Open Command Prompt here(Shift + Right click)

![](https://cdn-images-1.medium.com/max/2000/1*9xbTY-2uStjto4KcMxiCUw.png)

Step 5 — Test if your Apache is running by typing [*http://127.0.0.1*.](http://127.0.0.1.) You should get the below mentioned response:

![](https://cdn-images-1.medium.com/max/2000/1*jxDXStpZI7UUtgI7oF8uIw.png)

***In this article, take a look at [what is Regression testing](https://www.lambdatest.com/blog/regression-testing-what-is-and-how-to-do-it/?utm_source=devto&utm_medium=organic&utm_campaign=jul29_rd&utm_term=rd&utm_content=blog), its importance and types, and how to perform it. Read more!***

## Test Your Locally Hosted Websites and Webapps using LambdaTest

If you are looking for something simpler than XAMPP to serve your purpose of testing on an Apache test environment, then let me inform you about LambdaTest.

LambdaTest provides you a feature to test your [local page testing](https://www.lambdatest.com/local-page-testing?utm_source=devto&utm_medium=organic&utm_campaign=jul29_rd&utm_term=rd&utm_content=webpage) using the tunnel hosted through LambdaTest cloud servers. You can perform testing on simple and plain HTML, CSS, Python, PHP, etc., and similar web files that are stored on your local system.

Performing real-time interactive cross-browser testing is not only easy but is also helpful in figuring out whether the new feature is supported through multiple browsers prior to launching it into your Production environment.

![](https://cdn-images-1.medium.com/max/2000/1*nwn6CyqFA0hbXBe6jufM1Q.png)

If you notice, I was able to set up this template in **Lambda Tunnel** under 50 seconds/minute. I could also check how the template would appear on a different browser on a different OS.

Become an Insider and try Lambda Tunnel for free by registering on our website.