<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=The+Lord+of+Time</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=The+Lord+of+Time"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/The_Lord_of_Time"/>
	<updated>2026-07-10T00:47:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Nginx&amp;diff=76952</id>
		<title>Nginx</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Nginx&amp;diff=76952"/>
		<updated>2012-10-25T00:06:29Z</updated>

		<summary type="html">&lt;p&gt;The Lord of Time: Updated the configuration notation on where configs reside for Ubuntu given prior knowledge of the NGINX packages (member of the nginx team on Launchpad)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://nginx.net/ nginx] is a lightweight web server that powers 11.53% of web servers across all domains[http://en.wikipedia.org/wiki/Nginx#Usage]. Unless you have specific requirements that demand a heavy web server like Apache, you are much better off using nginx.&lt;br /&gt;
&lt;br /&gt;
Below are instructions on how to get Joomla! running with [http://wiki.nginx.org/PHPFcgiExample nginx and PHP via FastCGI].&lt;br /&gt;
&lt;br /&gt;
== Install nginx ==&lt;br /&gt;
For Ubuntu, run &amp;lt;tt&amp;gt;aptitude install nginx&amp;lt;/tt&amp;gt;. For other distros, run the corresponding package manager, or see http://wiki.nginx.org/Install.&lt;br /&gt;
&lt;br /&gt;
== Install PHP FastCGI == &lt;br /&gt;
For Ubuntu, read this excellent page on how to [http://wiki.nginx.org/PHPFcgiExample configure PHP and FastCGI for nginx].&lt;br /&gt;
&lt;br /&gt;
For Gentoo, PHP will run as a FastCGI service (fpm), so the nginx server will run PHP asa  different process:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;dev-lang/php gd gd2 curl simplexml tokenizer dom tidy sqlite xml fpm cgi&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# emerge php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The default settings of php-fpm are good for most servers. For special configuration visit the [http://php.net/manual/en/install.fpm.php PHP FPM site].&lt;br /&gt;
&lt;br /&gt;
== Configure Nginx ==&lt;br /&gt;
nginx configuration files reside in:&lt;br /&gt;
* &amp;lt;tt&amp;gt;/etc/nginx/sites-available/&amp;lt;/tt&amp;gt; on Ubuntu (for sites running on that nginx instance)&lt;br /&gt;
* &amp;lt;tt&amp;gt;/etc/nginx/nginx.conf&amp;lt;/tt&amp;gt; on Gentoo and Raspbian(= Debian optimized for Raspberry Pi)&lt;br /&gt;
&lt;br /&gt;
Here is an sample nginx configuration file joomla.conf that you can reuse over all your nginx enabled-sites&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
        listen 80;&lt;br /&gt;
        server_name YOUR_DOMAIN;&lt;br /&gt;
        server_name_in_redirect off;&lt;br /&gt;
&lt;br /&gt;
        access_log /var/log/nginx/localhost.access_log main;&lt;br /&gt;
        error_log /var/log/nginx/localhost.error_log info;&lt;br /&gt;
&lt;br /&gt;
        root PATH_ON_SERVER;&lt;br /&gt;
        index index.php index.html index.htm default.html default.htm;&lt;br /&gt;
        # Support Clean (aka Search Engine Friendly) URLs&lt;br /&gt;
        location / {&lt;br /&gt;
                try_files $uri $uri/ /index.php?q=$uri&amp;amp;$args;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # deny running scripts inside writable directories&lt;br /&gt;
        location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {&lt;br /&gt;
                return 403;&lt;br /&gt;
                error_page 403 /403_error.html;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        location ~ \.php$ {&lt;br /&gt;
            fastcgi_pass  127.0.0.1:9000;&lt;br /&gt;
            fastcgi_index index.php;&lt;br /&gt;
            include fastcgi_params;&lt;br /&gt;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;br /&gt;
            include /etc/nginx/fastcgi.conf;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # caching of files &lt;br /&gt;
        location ~* \.(ico|pdf|flv)$ {&lt;br /&gt;
                expires 1y;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {&lt;br /&gt;
                expires 14d;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pay attention for few things:&lt;br /&gt;
# The parameter &amp;lt;tt&amp;gt;fastcgi_pass&amp;lt;/tt&amp;gt; is set to 127.0.0.1:9000, corresponding to the port that fpm is configured to listen to. This means you can run the PHP processes on separate servers. On Gentoo, you can find this configuration in &amp;lt;tt&amp;gt;/etc/php/fpm-php5.3/php-fpm.conf/&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Don&#039;t forget to replace YOUR_DOMAIN &amp;amp; PATH_ON_SERVER depend on your domain and the path of Joomla on your server.&lt;br /&gt;
&lt;br /&gt;
== GZip support ==&lt;br /&gt;
If you need GZip compression support, add the following section to the http section of the main nginx configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        gzip on;&lt;br /&gt;
        gzip_http_version 1.1;&lt;br /&gt;
        gzip_comp_level 6;&lt;br /&gt;
        gzip_min_length 1100;&lt;br /&gt;
        gzip_buffers 4 8k;&lt;br /&gt;
        gzip_types text/plain application/xhtml+xml text/css application/xml application/xml+rss text/javascript application/javascript application/x-javascr$&lt;br /&gt;
        gzip_proxied     any;&lt;br /&gt;
        gzip_disable     &amp;quot;MSIE [1-6]\.&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* [http://en.gentoo-wiki.com/wiki/Nginx Nginx in Gentoo]&lt;br /&gt;
* [http://www.kevinworthington.com/nginx-for-windows/ Nginx for Windows]&lt;br /&gt;
* [http://wiki.nginx.org/Install#Ubuntu_PPA Nginx in Ubuntu]&lt;br /&gt;
* [http://www.debianadmin.com/howto-install-nginx-webserver-in-debian.html Nginx in Debian]&lt;br /&gt;
* [http://php.net/manual/en/install.fpm.php PHP-FPM installation and configuration]&lt;br /&gt;
* [http://wiki.nginx.org/HttpGzipModule GZip in Nginx]&lt;br /&gt;
* [http://wiki.nginx.org/HttpRewriteModule Rewrite in Nginx]&lt;br /&gt;
* [http://nginx.org/en/docs/http/request_processing.html How nginx processes a request]&lt;/div&gt;</summary>
		<author><name>The Lord of Time</name></author>
	</entry>
</feed>