If you want to create a website, it often makes sense to first try it out on the local machine and configure the website there. In any case, you need a local web server for this. With XAMPP this is easily possible under Windows. Here you will learn how to do it.
Table of contents
Web server installation under Windows with XAMPP
1. Step: Installation
Do you need a local web server because you want to create your own website for example?
Then here comes the solution: XAMPP. By installing XAMPP you get a web server including a database system (MySQL) and script languages (PHP, Perl). The installation is very easy. The first step is to download the latest version XAMPP. For installation you simply have to click just as usual. In the installation window Select Components you can uncheck FileZilla FTP Server, Mercury Mail Server and Tomcat.
2. Step: Configuration of XAMPP
After the installation, the XAMPP Control Panel is opened automatically. Alternatively you can start it unter the following path: INSTALLATIONPATH/xampp/xampp-control.exe. There we click on Start at Apache and MySQL. If no problems occur, the two names should have a green background. Next we click on Config and check Apache and MySQL. Under Change Language we could also change the language. Now we can quit the Control Panel. Then we start the browser and enter http://localhost/phpmyadmin/index.php into the address bar. If the page loads normally, everything should be fine.
At this point it should be mentioned that everyone in the local network has access to the database and the data that is in the path xampp/htdocs.
Protect webserver: prevent access from the outside
If you want to prevent access from the outside completely, then we only need to open the file xampp/apache/conf/httpd.conf and replace Listen 80 by Listen 127.0.0.1:80. Then we must restart the Apache server and now it should no longer be possible to access from the outside.
Notice:
At least for me it is usually not possible to stop Apache from the Control Panel. In this case, just quit the process httpd.exe using the Task Manager.
Other
For the activation of the "fileinfo"-packet, you have to change in the file xampp/php/php.ini the line ;extension=php_fileinfo.dll into extension=php_fileinfo.dll.