How to Install an Apache web Server on Arch Linux

In general, a web server hosts web content and answers requests for it from web browsers like Internet Explorer, Google Chrome, and Firefox. The apache web server, IIS web server, Nginx web server, and LiteSpeed web server are all examples of web servers. Apache is an open-source and free platform that is used by more than half of the world’s web servers.

Before installing the Apache web server, we have to update the packages of the system:

Pacman -Syu

We can now install Apache after the upgrade is complete:

Pacman -S Apaches

We’ll need to make a few configuration modifications when Apache is installed. Open the apache configuration file as follows:

sudo nano/etc/httpd/conf/httpd.conf

Remove the unique id module comment (you can spot it quickly by pressing ctrl w):

unique id module modules/mod unique id. so
#LoadModule unique_id_module modules/mod_unique_id.so

Now, restart the Apache using the following command:

sudo systemctl httpd restart

You may receive the following notification during the apache restart:

apr sockaddr info get() failed for droplet1 on httpd

We can’t find the fully qualified domain name of the server through 127.0.0.1 as a ServerName. Although this notice does not prevent Apache from starting, you can easily disable it by adding your hostname to your settings.

Using the following command, open the file for the host:

sudo nano /etc/hosts

To the end of the line that starts with 127.0.0.1, add your hostname:

127.0.0.1 localhost.localdomain localhost droplet1

Following restarts of Apache, the notification will no longer appear. Apache has now been deployed on your server. Your browser will display an auto-index directory if you navigate to your server’s IP address (http://12.34.56.789).

You can immediately test an example page by placing an index.html file in the “srv/http” directory of Arch’s document root directory:

sudo nano /srv/http/index.html

Conclusion

We’ve gone over how to set up Arch Linux, which is required to run and host the site. That’s all I’ve got for now. You now have a functional stack that is ready to host your websites. Please let us know if you have any doubts so we can resolve them.



from https://ift.tt/3qkyPnv

Post a Comment

0 Comments