Recent Blog Posts

How to set up an Apache2 or MYSQL server in windows


If you are looking for a solution to set up your MySQL server or Apache2 server and assuming that you are new to web server handling and database handling, I will provide you with the setup of your own webserver/database.

We will use the XAMPP (cross-platform, Apache, MySQL, PHP, and Perl)application to simplify the process and provide us with a user-friendly GUI that can be used by us efficiently to handle errors and other functions in our database. 


What is XMAPP?

XAMPP (Cross-Platform (X), Apache (A), MySQL (M), PHP (P), and Perl (P)) is an open-source web server solution for us fellow beginners that simplifies the process of setting up a local development environment. With XAMPP, anyone can easily create a web server, and a database server, and run PHP scripts on his/her Windows machine.


Downloading XMAPP 


Firstly, you will have to visit the XMAPP original website and then select your preference for the OS, In this case, we are obviously using Windows, So click on download XMAPP for Windows and it will just install in a minute or two.

After that -

  • In your Installation directory, Run the installed setup file and go through the on-screen instructions.

  • Check the Apache2 and MySQL components you want to install 

  • Make an installation directory where you can be more organized with the Apache2 and MySQL components (files and folders).

After it is done, we can move forward to making the use of the application.

Getting Started


Open XMAPP and you will be presented with various options such as Apache2, MySQL, and Perl services, along with buttons to start and stop them. After selecting your desired port number for the web server, simply click on "Start". I recommend using port 80 or 443. 

You can also view the server's Config and Logs, which will display any errors that occur. This makes it easy to identify and troubleshoot any issues. 

For your basic webserver needs, start the Apache2 server. In case of any errors, try changing ports as your firewall may restrict certain ports. Overall, XMAPP is a user-friendly tool for web development.





Once you have started the Apache2 server, Open your web browser and type localhost:(port number) or simply localhost which will take you to your hosted webserver.


For Apache2 (Creating a website):

For setting up an Apache2 website you can go through the C:\xampp\htdocs path and just add your website content to htdocs directory, This is where the main content of your website will be seen.

For MySQL Database:

In phpMyAdmin, click on the "Databases" tab and enter a name for your new database, then create database tables and manage your data using the intuitive phpMyAdmin interface.


And here we are, We have set up our first Apache2 server and MySQL database




Any Questions related to webserver hosting using Apache2? Comment down!

Comments