

- #CHANGE HOST FILE IN UBUNTU HOW TO#
- #CHANGE HOST FILE IN UBUNTU INSTALL#
- #CHANGE HOST FILE IN UBUNTU SOFTWARE#
We can do so with the following command: nano index.html Now that our directory structure is built, we need to create an index.html file for Apache to serve. Then navigate into the new directory for the next step: cd example Step 3: Create a Demo Page Lastly, let's modify the permissions on our new directory to ensure that read access is permitted to all users across the general web: sudo chmod -R 755 /var/www/example Now, let's create a new example directory where we'll store the code for our new Apache website: mkdir example This command will navigate to the /var/www directory on your server. Make sure you're in the correct directory using the following command: cd /var/www Step 2: Directory Structure and PermissionsĪll Apache websites are contained within the /var/For purposes of this tutorial, let's ignore that and set up our own. The first line ensures that your Ubuntu server components are all up to date and ensures that your system will grab the latest version of Apache for install.
#CHANGE HOST FILE IN UBUNTU INSTALL#
Just use the two following commands to update your server and install Apache: sudo apt update sudo apt install apache2 If not, it's quick and easy to get it started. If your Ubuntu server has been set up for a while, it's possible that you already have Apache installed and ready to go. Let's get started with the installation process. In this case, we'll be focusing on a Ubuntu server installation. You can also set up a free Apache web server on a Mac. I've worked with Apache on both Linux and Windows at this point and they work great. One of the great things about Apache is that it's cross-platform, meaning it can be installed on a variety of systems. Each domain or individual website in Apache is called a virtual host, which contains information about each of your websites, directing users to the correct applications within your server.

#CHANGE HOST FILE IN UBUNTU SOFTWARE#
The Apache HTTP Server, also just called Apache, is a free, open-source HTTP web server developed and maintained by an open community of developers of the Apache Software Foundation.Īpache is used in over 30% of all active websites on the internet today. Then we'll cover installing and setting up Apache with virtual hosts.
#CHANGE HOST FILE IN UBUNTU HOW TO#
So, with that said (you're extremely convinced now, right?), let's start with the basics and explanation of Apache web servers and how to set them up for your use in the real world. There's less to manage, less overhead, and, overall, it just works. Those days are behind me now, and for reasons I can't explain, Linux just makes more sense to me. Everything I did was on a Windows machine, whether a personal computer or server because I wanted to do everything in my power to avoid anything involving command-line tools. I wasn't much of a Linux guy up until recently.
