nginx on Ubuntu

Colin Arenburg

New member
Hey there,

I would like to move from Apache to Ningx on ubuntu, and after searching google i have not found any helpfully tutorials.



I think no tutorial for it. It only you uself must:

1. remove apache
2. install nginx
3. write NGINX config for you sites domains. - only uself (for it many TUT how to made NGINX config)

try to use it script - not shure if it work for Ubuntu but for CentOS work as me. It script install all that need instead of you


Well-known member
I suggest using nginx only for static content. Images, css, javascript.
There's only a small portion of nginx conf you need to edit, like so,

server {
        listen      8090;
        access_log  /var/log/nginx/  main;
        location / {
           root  /var/www/;
           index  index.php index.html index.htm;
(assuming you chose to use port 8090)
Then you replace static content url's like so,
Just my suggestion.


Well-known member
Just curious, why only static content? Nginx performs a zillion times better compared to Apache, for PHP requests. And that with the cache disabled.


Well-known member
I'm pretty much fed up with PHP-FPM.

I finally got my uploading bug fixed, only to find out that the fix breaks XF's multi-file uploader. That and the account/avatar bug that I can't figure out... just went back to nginx/Apache. The memory footprint for php-fpm is basically the same as my stripped apache. The page loads "feel" faster with PHP-FPM, but I think it's just because everything sort of organically appears, where apache waits a beat, then everything appears mostly all at once. Not sure that one is genuinely faster than the other, though.

I wouldn't remove Apache first (or at all) if you're installing nginx. If you have multiple external IP addresses, you can set apache to listen both on one external IP and on localhost:80, then set up nginx on another external IP with the reverse proxy stuff to apache (or php-fpm if you prefer). Once you're sure it's all working correctly, change your DNS record to point to the nginx IP address, wait a few days for everyone's records to update, then disable the external IP for apache (so it only listens on

Doesn't the nginx repo have ubuntu packages? Could always give that a try rather than compiling your own. I switched to their repo (but for RHEL/CentOS) a few months ago.

Adam Howard

Well-known member
Debian repository directly from Nginx

This is one of the few areas where Debian actually is released before Ubuntu

deb squeeze nginx
deb-src squeeze nginx