On Wed, Nov 13, 2013 at 07:50:11AM +0400, Kirill Bychkov wrote:
> On Wed, November 13, 2013 00:10, Stuart Henderson wrote:
> > On 2013/11/12 22:35, Kirill Bychkov wrote:
> >> On Tue, November 12, 2013 19:49, Stuart Henderson wrote:
> >> >> > On 13-11-11 07:06 PM, Stuart Henderson wrote:
> >> >> > >Help identify which ports currently rely on Apache from base, work 
> >> >> > >out
> >> >> > >which ones can use nginx and move them across (updating READMEs etc
> >> where
> >> >> > >necessary), which can use apache2 from ports and move them across, 
> >> >> > >and
> >> >> > >which (if any) won't work with either of these and require a port of
> >> >> > >the modified apache from base.
> >> >
> >> > Re this...
> >> >
> >> > We could do with some directory under /etc/nginx that ports can use as a
> >> > common place to install config fragments (that the use can then "include"
> >> in
> >> > nginx.conf), somewhat similar to /var/www/conf/modules.sample (but no
> >> > need for the symlink mechanism, having the user manually include them
> >> > makes more sense for nginx) and similar to debian's "sites-available"..
> >>
> >> I thought symlink mechanism helps you to keep config fragment in sync, 
> >> until
> >> you customize it.
> >
> >> As for me, this should be done like php modules ini and apache module
> >> configs
> >> - with the help of symlinks and not copying this configuration chunks.
> >
> > I'm not suggesting that people should copy the chunks to nginx.conf,
> > but use the "include" keyword.
> 
> Sorry, didn't get it at first.
> 
> >
> > So the file would be @sampled into (for example) /etc/nginx/includes
> > so it would be kept in-sync unless edited, but since we don't have
> > anything like Apache's <directory> blocks in nginx, the config
> > fragments need to be included within the correct part of nginx.conf,
> > so the file might a block like this,
> >
> > location = ... {
> >     some config
> > }
> >
> > and then we tell people in a README to add "include includes/somefile.conf"
> > within the "server" block for the relevant host.
> >
> >> This way or another, but we need some infrastructure for nginx config
> >> samples
> >> to encourage porters to test their webstuff with nginx without unneeded
> >> pain.
> >> Just my 0.02 RUR.
> >
> > I'm hoping that if we have some kind of framework, people can start
> > fitting things into it, it should be easier when we have some examples in
> > the ports tree.
> 
> +1
> So, the first step is to create /etc/nginx/includes, add it to mtree and make
> some changes in nginx and ports documentation?

Wouldn't be better to install all web apps into webserver root's subdirs by 
default,
i.e. /var/www/html/wordpress, and have something like this:

ln -sf /etc/nginx/webapps.sample/wordpress.conf \
   /etc/nginx/webapps/wordpress.conf

(I have never understand why Drupal is installed into /var/www/drupal IIRC but
wordpress directly into /var/www/html/wordpress. Shouldn't it be unified?)

If we would make all webapps being subdirs would could load conf files 
automatically
if the symlink exists.

If anybody would like to have it in webserver's root, then he could change
its nginx.conf. I think for testing or playing with webapps this could be
beneficial.

jirib

Reply via email to