How to build nginx from source with php upload progress module in ubuntu
Are you looking to configure Drupal with nginx Server? Here is how you build nginx from source with php upload progress module in ubuntu.
Create a directory nginx-src and change to that directory
mkdir nginx-src cd nginx-src
Then download the source package via apt
apt-get source nginx-full
If everything went successful, you get the nginx directory. inside the nginx directory, you have to modify the rules file in the directory debian in the debian/rules file add the configuration option
--add-module=$(MODULESDIR)/nginx-upload-progress
to the session config.status.full
(Note: The source package with ubuntu already includes the nginx-upload-progress module in the debian/modules directory, so you do not have to download the module separately)
Before compiling the package, we need to make sure every dependency libraries are available for compiling nginx with the command
sudo apt-get build-dep nginx-full
(In ubuntu I found that the dependency on libgd2-noxpm-dev conflicts with php5-gd package. So if you want to keep php5-gd with nginx you have to edit the debian/control file and change the dependency on libgd2-noxpm-dev to libgd2-xpm-dev)
After setting up all the dependencies, execute the command
dpkg-buildpackage -rfakeroot -uc -b
to build the debs required.
The deb files will be created in the nginx-src directory. You can then install the package with the command
sudo dpkg -i nginx-full_1.0.5-1_i386.deb
You can verify whether the upload-progress library is enabled with the command
sudo nginx -V