Websites with NGINX on Arch Linux

Select distribution:
Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Deprecated

This guide has been deprecated and is no longer being maintained.

Nginx is a lightweight and high performance web server, designed with the purpose of delivering large amounts of static content quickly and with efficient use of system resources. In contrast to the Apache HTTP server, which uses a threaded or process-oriented approach to handling requests, NGINX uses an asynchronous event-driven model to provide more predictable performance under load.

Before you begin installing the NGINX web server, it is assumed that you have followed our Setting Up and Securing a Compute Instance. If you’re new to Linux server administration, you may be interested in our introduction to Linux concepts guide, our beginner’s guide, and our administration basics guide.

Set the Hostname

Before you begin installing and configuring the components described in this guide, please make sure you’ve followed our instructions for setting your hostname. Issue the following commands to make sure it is set properly:

hostname
hostname -f

The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN).

Installing NGINX

Nginx is included in the Arch Linux software repositories. Issue following sequence of commands ensure that your system’s package manager and databases are up to date:

pacman -Sy
pacman -S pacman

Install the NGINX web server by issuing the following command:

pacman -S nginx

Edit the /etc/rc.conf file, adding “nginx” to the “DEAMONS=” line as shown in the following excerpt:

1
/etc/rc.conf

DAEMONS=(syslog-ng network netfs crond sshd ntpd nginx)

To start the server for the first time, use the following command:

/etc/rc.d/nginx start

Congratulations! You now have a running and fully functional HTTP server powered by NGINX. Continue reading our introduction to basic NGINX configuration for more information about using and setting up the web server.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This page was originally published on


Your Feedback Is Important

Let us know if this guide was helpful to you.


Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.
The Disqus commenting system for Linode Docs requires the acceptance of Functional Cookies, which allow us to analyze site usage so we can measure and improve performance. To view and create comments for this article, please update your Cookie Preferences on this website and refresh this web page. Please note: You must have JavaScript enabled in your browser.