banner



How To Easy Install Apache On Windows

When developing a website, a web designer needs to be able to see his webpages in the same way the cease user would. Sometimes merely clicking on and viewing your HTML files in the web browser is enough, but if you desire to test dynamic content, you will demand to set upward a local web server. Doing this is quite unproblematic and can easily exist accomplished on Windows, macOS, and Linux. There are many types of spider web servers available, but nosotros use Apache in this tutorial, as it is the most mutual server around, very easy to set upward, and uniform with all major operating systems.

Fix a local web server on Linux

Apache was designed for Unix-like operating systems. Linux falls under this category, and the installation and configuration of an Apache webserver can exist done in one footstep.

Here we deal with the command line. Most popular distributions allow y'all to install Apache without compiling information technology from source using one simple command.

For Debian, Ubuntu, and Ubuntu-based distro:

For Red Lid and CentOS

Once installed, navigate in your spider web browser to either "127.0.0.ane" or "localhost." If information technology displays "It Works!" that means your Apache installation is successful.

Web Server Ubuntu Install Apache

To better understand how Apache is serving this particular webpage, let's edit it. To do this, navigate to the root web directory of your Linux local machine.

Open "index.html" as root with your favorite text editor.

Search for "Information technology Works!" and change the text to something random similar "Make Tech Easier!" (It could exist annihilation really.) Make sure to save the file.

Now refresh the webpage on 127.0.0.i. Yous should see "Make Tech Easier!" where "It Works!" was formerly.

Web Server Ubuntu Edit Default

At present that you lot accept ready up a unproblematic web server, you can play with the configuration settings in "apache2.conf."

Note: be aware that every time you brand a configuration change, you will demand to restart Apache for it to apply.

If this does not work, you can restart information technology by directly executing the upstart file.

Set up a Local web server on macOS

The good thing about macOS is that Apache is installed on information technology by default. All you need to do is turn it on.

In Finder, become to "Applications -> Utilities," then double-click on Concluding to open information technology.

Macos Open Terminal App

To plough on your already pre-installed Apache web server, run the post-obit control:

To exam that our web server is running, navigate to "127.0.0.1" or "localhost" in your web browser.

Macos Web Server It Works

We can modify the content of the webpage by merely navigating to the document root the same way we did in Linux. The but matter that is different is the path location.

At present edit the "index.html.en" file using your favorite text editor. Modify "It works!" to "Hi World!"

mac-nano-open-index-html

If we refresh our webpage hosted on 127.0.0.1, we now come across the changes reflected.

Macos Web Server Hello World

To further configure Apache web server under macOS, navigate to the "httpd.conf" file.

Like Linux, you can easily restart the Apache service using the apachectl control with root privileges.

Fix a local web server on Windows

Unlike Linux and macOS, Windows is non Unix-based, and so at that place is no one-liner to install information technology. Fortunately, there are several install wizards that bundle things like Apache, MySQL, and PHP together to brand our lives easier. One of them is XAMPP.

Annotation: XAMPP is available for Linux and Mac OS X, too.

Download the Windows version of XAMPP and begin the installation. Execute the installer when prompted. You can select only Apache if all you need is a spider web server. However, if you are planning on using a database, you may want to select MySQL as well.

Windows Xampp Installer

Continue through the installation and click "Cease" when consummate. By default, the XAMPP control panel will be launched.

Windows Xampp Config Panel

Click "Start" for Apache and MySQL, if needed.

If y'all navigate to "127.0.0.i" or "localhost" in your spider web browser, you should see the XAMPP configuration page.

Windows Xampp Webpage Configuration 1

To create a new webpage, the procedure is the same. Open notepad and create a sample HTML file. Proper noun it "hi.html."

Windows Notepad Hello

Save information technology in the document root located in "c:\xampp\htdocs\".

Navigate to information technology using your web browser past going to 127.0.0.1/how-do-you-do.html. Yous'll be able to see the webpage y'all created.

Windows Xampp Webpage Hello

Note: WampServer is another solid option for installing Apache on Windows.

Conclusion

Apache is an excellent solution for edifice both uncomplicated and complex websites, just it is not the just option. While Apache integrates well across all 3 platforms, you may want to look at IIS as an pick for Windows, as it supports many Windows authentication features that Apache does not. However, for but testing the base of operations functionality of a website, Apache is perfect.

Subscribe to our newsletter!

Our latest tutorials delivered directly to your inbox

Source: https://www.maketecheasier.com/setup-local-web-server-all-platforms/

Posted by: cliffordlase1988.blogspot.com

0 Response to "How To Easy Install Apache On Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel