// archives

Configuring Apache to mimic development environment

This tag is associated with 1 posts

Configuring Apache server for Development to mimic production setup.


Most of the time a developer will need to test his programs against the production setup, to closely monitor the performance of the developed programs or if it will perform as expected when put into production. The best thing to do it is to enable Apache to mimic the production server setup so that the only thing a developer need to do is to transfer the files to the production server.

This is easily accomplished in Apache server using the virtual host configuration, wherein we can setup a server instance which exactly matched our production server. We just need to enable all the modules that we need and proceed in configuring the virtual host file.

Why do we need to enable virtual host?, you would say but apparently virtual host is needed if:

* you´re on multiple domains
* you need to test your projects with same configuration with the server
* test your projects without touching your public server
* you´re just organizing your projects into groups
* or setup a local copy of your blog or website

What do we need?, we need a server or a local computer running Apache either in Windows or Linux. Since most of us are developing using Windows we might as well use Windows using Apache Xampp for this setup.

1. In Apache we usually edit the httpd.conf to configure the virtual host file, but in Xampp it is a separate file being called inside the apache httpd.conf. You will find your httpd.conf in your drive where you installed Xampp in my case it’s in my D: drive under the xampp folder navigate through D:\xampp\apache\conf you will find there your httpd.conf.

2. Inside our D:\xampp\apache\conf directory we will see a folder named extra. These folder holds additional configuration for our apache server. Before the functions can be configurable inside the httpd.conf but now it is just being called inside the httpd.conf when we start the server. Configuration in this manner is much simple since we will immediately know in which part of the configuration, we have committed an error if our server suddenly doesn’t start. It is always a good idea to create a backup of the original file for reference or to restore it to original state if we commit an error.

Share

Site Archives

Thailand Interior Designer

Oliver & Associates
QR CODE

Register and Participate

Registration to this website is free. Feel free to use and explore the features of the website. You are welcome to participate and interact with us in the forum. If you have concerns that you want us to know you can easily contact us using this link. By registering in this website, your account will allow you to login and participate in the forum and to access additional information that is only available to registered users. We are keeping this website to be informative for us and to our users.

Register/Login

Syndication

feeds

Podcast Subscribe

Bluehost

Site Counter

Google 1(One) Day Stat


17
Unique
Visitors
Powered By Google Analytics

Data Recovery Buy Now!

Recovers all lost files and partitions from window
Get Adobe Flash player

Save all your files in the cloud 100% free: