Difference between pages "Package:Nginx" and "Ebuilds by CatPkg"

(Difference between pages)
Line 1: Line 1:
This page lists all ebuilds with pages on the Funtoo Linux wiki.
|Summary=Robust, small and high performance HTTP and reverse proxy server
{{#ask:[[Category:Ebuilds]] [[CatPkg::+]]
|mainlabel=Wiki Page
|Repository=Funtoo Overlay
|searchlabel=… further results
|class=sortable wikitable smwtable
== What is nginx ==
nginx (pronounced "engin-x") is a Web and reverse proxy server for HTTP, SMTP, POP3 and IMAP protocols. It focuses on high concurrency, performance and low memory usage. Nginx quickly delivers static content with efficient use of system resources, also dynamic content is delivered on a network using FastCGI, SCGI handlers for scripts, uWSGI application servers or Phusion Passenger module (atm broken in [http://funtoo.org funtoo]), further more it can serve a very capable software load balancer. It uses an asynchronos event-driven approach to handle requests which provides more predictable performance under load, in contrast to the Apache HTTP server model, that uses a threaded or process-oriented approach to handling request. Nginx is licensed under a BSD-like license and it runs on Unix, Linux, BSD variants, Mac OS X, Solaris, AIX and Microsoft Windows.
== Installation ==
=== USE flags ===
Before you can install nginx, there are the following USE-flags available, these can be set by ''/etc/portage/package.use'' or ''/etc/portage/package.use/nginx'', depending on your setup of package.use.
* aio - Enables file AIO support
* debug - Enables extra debug codepaths, like asserts and extra output.
* http - Enable http serving
* http-cache - Enables caching for http files
* ipv6 - Enables IPv6 support
* libatomic - Use libatomic instead of buildtin atomic operations
* pcre - Enables support for Perl Compatible Regular Expressions
* ssl - Adds support for Secure Socket Layer connections
* vim-syntax - Pulls in related vim syntax scripts
Further more you can set the nginx modules you like to use in ''/etc/make.conf'' in the NGINX_MODULES_HTTP variable as NGINX_MODULES_HTTP="variables".
=== USE Expanded flags ===
nginx USE-flags go into ''/etc/portage/package.use'' or ''/etc/portage/package.use/nginx'', while the HTTP and MAIL modules go as NGINX_MODULES_HTTP or NGINX_MODULES_MAIL are stored in /etc/make.conf. And as you wouldn't server only static html files, but most commonly also php files/scripts you should also install php with fpm enabled and xcache for caching the content, what makes your nginx setup way faster. For xcache you need to set PHP_TARGETS="php5-3" in '/etc/make.conf'.
echo "www-servers/nginx USE-FLAG-List" >> /etc/portage/package.use/nginx
=== Emerging nginx ===
Now you are ready to install nginx with php and xcache support:
emerge -avt nginx php xcache
so now just check your useflags and press enter to start emerge.
== Configuring ==
All configuration is done in ''/etc/nginx'' with ''nginx.conf'' as the main configuration file and all virtual hosts in ''/etc/nginx/sites/available'' while you have to symlink ''/etc/nginx/sites-available/{VHOST}'' to ''/etc/nginx/sites-enabled/{VHOST}'' to activate them. An example config for such a {VHOST} looks like that:
server {
    listen          80;
    server_name    www.example.com;
    access_log      /var/log/nginx/www.example.com.access_log main;
    error_log      /var/log/nginx/www.example.com.error_log info;
    root /var/www/www.example.com/htdocs;
The ''nginx.conf'' and ''sites-available/localhost'' file is well commented. Customize it to your needs. Make sure you set the listen option correctly. By default, the listen option is set to listen on the loopback interface. If you leave this unchanged other computers on the network will not be able to connect to the server.
== Location Processing Order ==
One often confusing aspect of nginx configuration is the order in which it processes location directives. This section is intended to clarify the confusion and help you to write secure nginx location directives.
=== Two basic types of Location directives ===
There are two basic types of location directives. The first is called a "conventional string", and looks something like this:
location /foo { deny all; }
The second basic type of location directive is a regex, or regular expression block. In its most basic form, it looks like this, with a "~" and then a regular expression that is matched against the request path. "^" can be used to match the beginning of the request path, and "$" can be used to match the end of the request path. If you need to match a ".", you must escape it as "\." as per regular expression matching rules:
location ~ \.php$ { blah; }
=== The basic algorithm ===
Nginx uses a special algorithm to find the proper location string to match the incoming request. The basic concept to remember is that conventional string directives are placed in one "bucket", and then regular expression strings are placed in another "bucket". Nginx will use the first regular expression match that it finds, when scanning the file from top to bottom. If no matching regular expression is found, nginx will look in its "conventional string" bucket, and try to find a match. In the case of the conventional string matches, the most ''specific'' match will be used, in other words, the one will be used that matches the greatest number of characters in the request path.
This is the foundation for nginx location processing, so always use these rules as a starting point for understanding location matching order. Nginx then provides various sub-types of location directives which modify this default behavior in a number of ways. This will be covered in the next section.
== Advanced Location Processing ==
Always use the location processing logic described in the previous section as the foundation for understanding how nginx finds a matching location directive, and then once you are comfortable with how this works, read about these more advanced directives and understand how they fit into nginx's overall logic.
=== = (equals) Location ===
One advanced location directive is the "=" location, which can be considered a variant of a "conventional string" directive. "=" directives are searched before all other directives, and if a match found, then the corresponding location block is used. A "=" location must the requested path ''exactly'' and ''completely''. For example, the following location block will match only the request /foo/bar, but not /foo/bar/oni.html:
location = /foo/bar { deny all; }
=== ~* (case-insensitive regex) Location ===
A "~*" regex match is just like a regular "~" regex match, except matches will be performed in a case-insensitive manner. "~*" location directives, being regex directives, fall into the regex "bucket" and are processed along other regex directives. This means that they are processed in the order they appear in your configuration file and the first match will be used -- assuming no "=" directives match.
=== ^~ (short-circuit conventional string) Location ===
You may think that a "^~" location is a regex location, but it is not. It is a variant of a conventional string location. If you recall, nginx will search for conventional string matches by finding the ''most specific'' match. However, when you use a "^~" location, nginx behavior is modified. Imagine the way a conventional string match works. Nginx scans your configuration file, looking at each conventional string match from line 1 to the end of file, but it scans ''all'' conventional string matches to find the ''best'' match. Well, the "~^" location match short-circuits this process. If, in the process of scanning each conventional string match in the config file, nginx encounters a "^~" match that matches the current request path, then nginx will apply this match, and stop looking for the ''best'' match.
== Ebuild Update Protocol ==
To work on a new version of the ebuild, perform the following steps.
First, temporarily set the following settings in <tt>/etc/make.conf</tt>:
<syntaxhighlight lang="bash">
This will enable all available modules for nginx.
Now, create a new version of the ebuild in your overlay, and look at all the modules listed at the top of the ebuild. Visit the URLs in the comments above each one and ensure that the latest versions of each are included. Now run <tt>ebuild nginx-x.y.ebuild clean install</tt> to ensure that all modules patch/build properly. Basic build testing is now complete.

Revision as of 04:59, June 16, 2014

This page lists all ebuilds with pages on the Funtoo Linux wiki.

Wiki PageCatPkgRepositorySummary
389 Directory Servernet-nds/389-ds-baseThis is the core part of 389 Directory Server -- technically, all you need for an LDAP deployment, although many will want to install 389-ds-admin for the graphical management capabilities, too.
389 Directory Server Admin Servernet-nds/389-adminThe 389 Directory Server Admin Server is an Apache-based application server that can optionally be deployed alongside 389 Directory Server. It allows for remote Java-based management of your 389 Directory Server deployment.
389 Directory Server AdminUtildev-libs/389-adminutilAdminUtil is a set of utility functions written in C, and a dependency of 389 Directory Server.
389 Directory Server Consoleapp-admin/389-ds-consoleThis is the Java-based remote management console that is used for managing 389 Directory Server (administration as well as the server app itself.)
ACPI Daemonsys-power/acpidDaemon for Advanced Configuration and Power Interface
AMD Catalyst Video Driversx11-drivers/ati-driversAccelerated ATI/AMD binary drivers for Radeon HD 5000 and newer chipsets.
APC UPS Daemonsys-power/apcupsdAPC UPS daemon with integrated network-based remote shutdown
Apachewww-servers/apacheThe Apache Web Server
Apache-toolsapp-admin/apache-toolsUseful Apache tools - htdigest, htpasswd, ab, htdbm
Apparmorsys-apps/apparmorUserspace utils and init scripts for the AppArmor application security system
Ardourmedia-sound/ardourArdour is a fully featured audio and MIDI multi-track recording and editing digital audio workstation.
Audacious Music Playermedia-sound/audaciousAudacious is a lightweight GTK-based music player which supports many formats. It does not use the library concept but rather playlists for managing your music.
Awesome (Window Manager)x11-wm/awesomeA dynamic floating and tiling window manager.
BSF Bean Scripting Frameworkdev-java/bsfA framework that allows many scripting languages to be plugged into a Java application.
Baselayoutsys-apps/baselayoutFilesystem baselayout, initscripts and /sbin/realdev command
Bashapp-shells/bashThe standard GNU Bourne-again shell.
Bash completionapp-shells/bash-completionBash tab-completion
Batikdev-java/batikJava-based SVG toolkit.
Bindnet-dns/bindBIND - Berkeley Internet Name Domain - Name Server
Bind-toolsnet-dns/bind-toolsbind tools: dig, nslookup, host, nsupdate, dnssec-keygen
Bitwig Studiomedia-sound/bitwig-studioMusic production and performance system
Blendermedia-gfx/blender3D Creation/Animation/Publishing System
Boodev-lang/booA wrist-friendly language for the CLI.
Boot-Updatesys-boot/boot-updateFuntoo Core Boot Framework for global boot loader configuration
Boot-Update/pt-brsys-boot/boot-updateFuntoo Core Boot Framework for global boot loader configuration
CA Certificatesapp-misc/ca-certificatesThis package contains SSL certificates in PEM format that are used to validate the authenticity of remote systems, using the certificate authority system.
CCachedev-util/ccacheCCACHE is an application that caches compilation results and reuses it in future compilations in order to achieve faster compile times.
Camoramamedia-video/camoramaA webcam application featuring various image filters
Chromiumwww-client/chromiumChromium is the Open Source Web browser that serves as the foundation for Google Chrome.
Chronynet-misc/chronyChrony is a pair of programs (chronyd and chronyc) which are used to maintain the accuracy of the system clock on a computer. chronyd has been specifically written to work well for systems which have only an intermittent (e.g. dial-up) connection to the network where the NTP servers are. It still works well in a "permanently connected" mode.
Chuseapp-portage/chuseA USE flags manager
Clamavapp-antivirus/clamavClam Anti-Virus Scanner
Comptonx11-miscA compositor for X.
Cx Oracledev-python/cx-oraclePython interface to Oracle.
Darktablemedia-gfx/darktableA virtual lighttable and darkroom for photographers
Dashapp-shells/dashDASH is a direct descendant of the NetBSD version of ash (the Almquist SHell) and is POSIX compliant
Dbussys-apps/dbusA message bus ystem, a simple way for applications to talk to each other
DeaDBeeFmedia-sound/deadbeefA foobar2000-like music player
Dhcpcdnet-misc/dhcpcdA fully featured, yet light weight RFC2131 compliant DHCP client
Dictd Moby Thesaurusapp-dicts/dictd-moby-thesaurusThis package contains the Moby Thesaurus, produced as part of the Moby Project. It is designed to work with dictd dictionary server.
Dirvish Backupapp-backup/dirvishSimple text-based configuration backup program composed of perl wrappers and using ssh and rsync
Dnscryptnet-dns/dnscrypt-proxyA tool for securing communications between a client, and a DNS resolver.
Dnsmasqnet-dns/dnsmasqSmall forwarding DNS server
Dovecotnet-mail/dovecotAn IMAP and POP3 server written with security primarily in mind
Drbdsys-cluster/drbdmirror/replicate block-devices across a network-connection: This is the user space tools to control, configure the DRBD driver, as well as integration programs and scripts that glues the DRBD system to cluster management software and other system components.
Drupalwww-apps/drupalPHP-based open-source platform and content management system
Dwmx11-wm/dwmdwm is an extremely fast and lightweight window manager. It manages windows in tiled, floating and monocle layouts.
Eclipsedev-util/eclipse-sdk-binA powerful integrated development environment (IDE) written in Java.
Eixapp-portage/eixA command to search and query ebuilds, portage including local settings, overlays, version changes, and more.
… further results