![]() ![]() Make sure to replace with your domain name. If you need to host multiple domains, create separate directories for every domain.įor our domain, we will create the directory with the following command: $ sudo mkdir /var/www/ The first step will be to create a directory for your domain. Step 1: Create a directory for your domain For multiple domains, follow the same steps for each domain. In the following section, we will configure one virtual host for our domain " ". Virtual host in Apache allows you to run a number of websites from a single Apache Web Server. Steps to configure Virtual Hosts in Apache ? If everything is in order then you will see an output with an active (running) state which shows that the Apache service is active and running without any issues.įor manually starting the Apache service, use the below command: $ sudo systemctl start apache2įor enabling the Apache service to automatically start at startup/boot, use the below command: $ sudo systemctl enable apache2įor restarting the Apache service, use the below command: $ sudo systemctl restart apache2įor stopping the Apache service, use the below command: $ sudo systemctl stop apache2 ![]() To view the status of Apache service, issue the below command in Terminal: $ systemctl status apache2 In order to allow both HTTP (port 80) and HTTPS (port 443) traffic through in the firewall, execute the following commands in Terminal: $ sudo ufw allow 'Apache Full'Īfter installation, the Apache service automatically starts running in the background. To allow HTTPS (port 443) traffic through the firewall, execute the following command in Terminal: $ sudo ufw allow 'Apache Secure' In order to allow HTTP (port 80) traffic through the firewall, execute the following command in Terminal: $ sudo ufw allow 'Apache' The Apache server by default listens on port 80 for HTTP and 443 for https. If a firewall is enabled on your OS, you will have to allow Apache traffic through it. How to allow Apache Traffic through Firewall ? The Prerequisites required to complete Apache configuration Allow/Deny access from specific IP addresses Configure Apache to listen on a different port The basic configuration of Apache that will include: In this context, we shall look into how to configure Apache. Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform Ubuntu related queries. This configuration is termed LAMP (Linux, Apache, MySQL and Perl/Python/PHP) and forms a powerful and robust platform for the development and deployment of Web-based applications. Web servers are used to serve Web pages requested by client computers. Apache is the most commonly used Web server on Linux systems. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |