In the example of this tutorial, will be used as a domain, but you will have to use an existing domain that you own.īy accessing the IP address of the Server where you have just installed Apache, you can normally find the content of your website inside a public folder at var/www/html. There is another IP-based mode, when multiple domains have to be each associated with a different IP address. The example of Virtual Host configuration shown in this tutorial is name-based, since it relies on the website's domain name to distinguish requests. To remove Apache, just type: sudo apt-get purge apache2 Configuring Virtual Host on Apache In this case, uninstalling Apache and proceeding with a new installation is advisable. ![]() If this is not the case, some problems may have occurred while installing Apache. If the web server was successfully installed, the Apache welcome page will be displayed. http: // localhost (when accessing the server locally).http: // your_IP_address (replace with the IP of your Cloud Server, when connecting from the outside).Then, open your browser and connect to the IP address of your Server: To check its stateuse the command: sudo systemctl status apache2 In case of using UFW, allow bidirectional communications between Apache and a Client by typing: sudo ufw allow 'Apache Full'Īpache should already be running. Since Apache communicates externally, it should be inserted among the exceptions of your Firewall. To install Apache 2 through the official Ubuntu repositories, proceed by typing: sudo apt-get update sudo apt install apache2 In case of a local server, go to the next step and open the terminal of your server. If you haven’t done so yet, following our guide is recommended to connect securely with the SSH protocol. ![]() To get started, connect to your server via an SSH connection. ![]() In this tutorial, you will then see how to install Apache 2 on your Ubuntu 20.04 server and how to configure it to create two virtual hosts and host two separate websites on a single server. Among those available, one of the best known is Apache, an open source software compatible with both Unix and Windows systems.īut what if you need to host multiple websites on the same server, despite having only one public IP address available? In this case, configure Virtual Hosts on Apache to associate different domains with the same IP address. If you need to host a website on your machine, first, install a web server. Each website published on the Internet is hosted on a web server (host), connected to the network with a public IP address and able to manage requests for web pages on a browser (client) such as Chrome, Firefox or Internet Explorer.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |