Rpm packaging a web application software to run on nginx

Hi,

I’m trying to add Nginx support to the LDAP Account Manager RPM
package.

In Apache, the package adds a /etc/httpd/conf.d/lam.apache.conf that
has a simple Alias directive:

Alias /lam /usr/share/ldap-account-manager

However when I try to do that with a Location directive
in /etc/nginx/conf.d/lam.nginx.conf, I get:

“location directive is not allowed here”

I have to put the Location directive inside a server block, which
makes the config file not usable out of the box (the user has to
manually place it in all server blocks, including the default one).

Since my Apache way of thinking isn’t working in Nginx, my question
is: How do I prepare an RPM package of a web application, which when
installed, will be up and running in Nginx without any manual editing
on the user’s part?

               Doruk


Özgür Yazılım A.Ş. ~ #
http://www.ozguryazilim.com.tr

Hello Doruk,

Package manager should not undertake creating usable configuration,
this is
configuration manager prerogative. The PM must create a sample
configuration
(“Welcome to Nginx”).

I would declare your conf file as %doc, then rpmbuild will put it to
/usr/share/doc/%{name}-%{version}/

Experienced users will see it and fit to their needs. Beginners will
ignore it
and copy-paste configs from forums anyway :slight_smile:

On Saturday, February 22, 2014 03:55:17 PM Doruk Fisek wrote:

However when I try to do that with a Location directive
installed, will be up and running in Nginx without any manual editing
[email protected]
nginx Info Page

Sincerely yours,
Styopa S…