Hi all,

I am new to website development and I thought I would try the combination of Nginx + PHP-FPM + Drupal on Ubuntu Server 14.04. I am using the desktop version of Ubuntu and installed VirtualBox as a test environment. I am using perusio's configuration at https://github.com/perusio/drupal-with-nginx. Here are the exact steps I followed, which I documented as I was attempting the setup:

1. Start VirtualBox (vmhost) with bridged networking and the Ubuntu .iso mounted.
2. Install Ubuntu as user “pmaddams” with all default options, and only the core packages.
3. apt-get update && apt-get upgrade

# At this point Ubuntu is installed and up to date.

4. apt-get install nginx mariadb-server mariadb-client php-pear php5-mysql php5-fpm php5-gd git openssh-server
5. ip addr
6. On the host machine, add guest IP to /etc/hosts as “vmhost.”

# Going to http://vmhost in the browser now displays the nginx welcome page. I can now work from the host machine via SSH.

7. ssh pmaddams@vmhost
8. wget http://ftp.drupal.org/files/projects/drupal-7.30.tar.gz
9. tar -xzvf drupal-7.30.tar.gz
10. mv drupal-7.30/* /usr/share/nginx/html/drupal
11. mv /etc/nginx /etc/nginx.old
12. git clone https://github.com/perusio/drupal-with-nginx.git /etc/nginx
13. cd /etc/nginx && git checkout D7

# All the default files are now in place. This is where configuration becomes necessary.

14. nano /etc/nginx/sites-available/example.com.conf
15. Modify root to /usr/share/nginx/html/drupal
16. mkdir /etc/nginx/sites-enabled && ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
17. cd /usr/share/nginx/html/drupal/sites/default && cp default.settings.php settings.php
18. chmod a+w . && chmod a+w settings.php

# Without checking the configuration with nginx -t I continued to create a database.

19. mysql -u root -p
20. create database drupal; create user pmaddams@vmhost; set password for pmaddams@vmhost= password("******"); grant all privileges on drupal.* to pmaddams@vmhost identified by '******'; flush privileges; exit

Then I tried to access http://vmhost/drupal and got nothing. The nginx configuration fails with ‘unknown directive “upload_progress” in /etc/nginx/nginx.conf:146.’ Any thoughts on what to do next? I am certain that something related to PHP-FPM needs to be modified, and there may be other issues as well. Help would be appreciated. Thanks.

Comments

flamingalah’s picture

You probably have to install the uploadprogress module via: pecl install uploadprogress

Kristina Katalinic’s picture

I believe that perusio's configuration works with nginx upload progress module which is not part of a standard nginx package so you would have to install using:
apt-get install nginx-extras

Brisbane Web Design, Development and SEO consulting services.
www.webmar.com.au

cthshabel’s picture

Kristina is correct. Just a few days ago I ran into the same problem on an Ubuntu 14.04 instance on AWS. Using the 'sudo apt-get install nginx-extras' installed the necessary packages. Make note, if you already did this steps mentioned above, you need to 'sudo apt-get remove nginx' and/or 'sudo apt-get purge nginx' to get rid of all the configuration files from the "basic" nginx installation. Just repeat the steps again, but use the nginx-extras package. There is an excellent writeup here that helped me get everything up and running.