Commit fe85633c authored by Louis Chemineau's avatar Louis Chemineau
Browse files

Merge branch 'master' into 'master'

# Conflicts:
#   lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/PortalConstants.pm
parents 7d503fd0 93cb619c
Pipeline #10003 failed with stages
in 21 minutes and 16 seconds
.gitignore
.vstags
node_modules
doc/sources/admin/_build/
doc/pages/documentation/
e2e-tests/conf
lemonldap-ng-common/MYMETA.json
lemonldap-ng-common/MYMETA.yml
......@@ -22,3 +23,5 @@ lemonldap-ng-portal/MYMETA.yml
lemonldap-ng-portal/Makefile
lemonldap-ng-portal/blib/
lemonldap-ng-portal/pm_to_blib
lemonldap-ng-*/MANIFEST.bak
node_modules
......@@ -2,6 +2,8 @@
stage: build
script:
- apt-get update && apt-get -y dist-upgrade
# Workaround for bionic
- DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata
- ci-build-pkg
artifacts:
expire_in: 1 hour
......@@ -9,17 +11,6 @@
- result/*
.build_job_centos:
stage: build
script:
- yum -y install epel-release
- make rpm-dist
- ci-build-pkg
artifacts:
expire_in: 1 day
paths:
- result/*
stages:
- build
- sign
......@@ -59,8 +50,31 @@ build_bionic:
<<: *job_build
build_centos_7:
image: buildpkg/centos:7
extends: .build_job_centos
image: buildpkg/centos:7
stage: build
script:
- rm -f /etc/yum.repos.d/CentOS-Sources.repo
- yum -y install epel-release
- make rpm-dist
- ci-build-pkg
artifacts:
expire_in: 1 day
paths:
- result/*
build_centos_8:
image: buildpkg/centos:8
stage: build
script:
- yum-config-manager --enable PowerTools
- yum-config-manager --enable AppStream
- yum -y install epel-release
- make rpm-dist
- ci-build-pkg
artifacts:
expire_in: 1 day
paths:
- result/*
sign:
image: buildpkg/debian:stretch
......@@ -77,6 +91,7 @@ sign:
- build_disco
- build_bionic
- build_centos_7
# - build_centos_8
artifacts:
expire_in: 1 day
paths:
......
### Concerned version
### Environment
Version: %X.X.X
LemonLDAP::NG version: (version number)
Platform: (Nginx/Apache/Node.js)
Operating system: (distribution and version)
Web server: (Nginx/Apache/Node.js/...)
### Summary
......@@ -11,7 +13,7 @@ Summarize the bug encountered concisely
### Logs
```
Set here the logs using debug mode if possible. Attach it as file if it's too big
Include the logs using logLevel = debug if possible. Attach it as file if it's too big
```
### Backends used
......
### Summary
Summarize the new feature encountered concisely
Summarize the desired feature concisely
### Design proposition
Describe here the process imaginated (interface design suggest, proposed process,…)
Describe here the proposed implementation of this feature (interface design suggestions, general architecture, pseudo-code,…)
......@@ -98,7 +98,7 @@ Comment: downloaded from
Files: lemonldap-ng-portal/site/htdocs/static/common/modules/GitHub.png
Copyright: GitHub
License: MIT
License: Expat
Comment: downloaded from
https://commons.wikimedia.org/wiki/File:Octicons-mark-github.svg
......@@ -138,13 +138,13 @@ Comment: This work, "decryptValue.png", is a derivative of
Files: lemonldap-ng-portal/site/htdocs/static/common/icons/switchcontext_OFF.png
Copyright: Christophe Maudoux <chrmdx@gmail.com>
License: CC-4
License: CC-BY-4.0
Comment: This work, "switchcontext_OFF.png", is a derivative of
"Theater-Masken - Silhouetten und kontur vektoren" by Natasha Sinegina, under CC-BY-4.0.
Files: lemonldap-ng-portal/site/htdocs/static/common/icons/switchcontext_ON.png
Copyright: Christophe Maudoux <chrmdx@gmail.com>
License: CC-4
License: CC-BY-4.0
Comment: This work, "switchcontext_ON.png", is a derivative of
"Theater-Masken - Silhouetten und kontur vektoren" by Natasha Sinegina, under CC-BY-4.0.
......@@ -242,22 +242,17 @@ Copyright: 2014-2015, Google Inc.
License: BSD-3-clause
Files: lemonldap-ng-portal/site/htdocs/static/common/apps/*
doc/pages/documentation/current/icons/*
doc/sources/admin/icons/*
Copyright: 2006-2007 Everaldo Coelho, Crystal Project
License: LGPL-3
Files: doc/pages/documentation/current/lib/images/*
Copyright: 2004-2012 Andreas Gohr <andi@splitbrain.org>
and the DokuWiki Community
License: GPL-2
Files: doc/pages/documentation/current/documentation/lasso*.png
Files: doc/sources/admin/documentation/lasso.png
Copyright: 2004, Entr'ouvert <https://www.entrouvert.com/>
2004, Florent Monnier
License: GPL-2+
Files: debian/*
Copyright: 2005-2019, Xavier Guimard <yadd@debian.org>
Copyright: 2005-2020, Xavier Guimard <yadd@debian.org>
License: GPL-2+
License: Apache-2.0
......@@ -740,7 +735,7 @@ License: CC-BY-NC-ND-3.0
title of the Work if supplied; (iii) to the extent reasonably
practicable, the URI, if any, that Licensor specifies to be associated
with the Work, unless such URI does not refer to the copyright notice or
licensing information for the Work. The credit required by this Section
licensing information for the Work. The credit required by this Section
(c) may be implemented in any reasonable manner; provided, however, that
in the case of a Collection, at a minimum such credit will appear, if a
credit for all contributing authors of Collection appears, then as part
......@@ -949,27 +944,27 @@ License: CC-BY-4.0
.
Attribution.
.
If You Share the Licensed Material (including in modified form), You
must: retain the following if it is supplied by the Licensor with the
Licensed Material: identification of the creator(s) of the Licensed
Material and any others designated to receive attribution, in any
reasonable manner requested by the Licensor (including by pseudonym if
designated); a copyright notice; a notice that refers to this Public
License; a notice that refers to the disclaimer of warranties; a URI or
hyperlink to the Licensed Material to the extent reasonably practicable;
indicate if You modified the Licensed Material and retain an indication
of any previous modifications; and indicate the Licensed Material is
licensed under this Public License, and include the text of, or the URI
or hyperlink to, this Public License. You may satisfy the conditions in
Section 3(a)(1) in any reasonable manner based on the medium, means, and
context in which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or hyperlink to
a resource that includes the required information. If requested by the
Licensor, You must remove any of the information required by Section
3(a)(1)(A) to the extent reasonably practicable. If You Share Adapted
Material You produce, the Adapter's License You apply must not prevent
recipients of the Adapted Material from complying with this Public
License.
If You Share the Licensed Material (including in modified form), You
must: retain the following if it is supplied by the Licensor with the
Licensed Material: identification of the creator(s) of the Licensed
Material and any others designated to receive attribution, in any
reasonable manner requested by the Licensor (including by pseudonym if
designated); a copyright notice; a notice that refers to this Public
License; a notice that refers to the disclaimer of warranties; a URI or
hyperlink to the Licensed Material to the extent reasonably practicable;
indicate if You modified the Licensed Material and retain an indication
of any previous modifications; and indicate the Licensed Material is
licensed under this Public License, and include the text of, or the URI
or hyperlink to, this Public License. You may satisfy the conditions in
Section 3(a)(1) in any reasonable manner based on the medium, means, and
context in which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or hyperlink to
a resource that includes the required information. If requested by the
Licensor, You must remove any of the information required by Section
3(a)(1)(A) to the extent reasonably practicable. If You Share Adapted
Material You produce, the Adapter's License You apply must not prevent
recipients of the Adapted Material from complying with this Public
License.
.
Section 4 – Sui Generis Database Rights.
.
......
......@@ -31,12 +31,12 @@ package for Debian works fine).
Perl modules:
Apache::Session, Net::LDAP, MIME::Base64, CGI, LWP::UserAgent, Cache::Cache,
DBI, XML::Simple, SOAP::Lite, HTML::Template, XML::LibXML, XML::LibXSLT
DBI, SOAP::Lite, HTML::Template, XML::LibXML, XML::LibXSLT
With Debian:
apt-get install libapache-session-perl libnet-ldap-perl libcache-cache-perl \
libdbi-perl perl-modules libwww-perl libcache-cache-perl \
libxml-simple-perl libhtml-template-perl libsoap-lite-perl \
libhtml-template-perl libsoap-lite-perl \
libxml-libxml-perl libxml-libxslt-perl
1.2 - BUILDING
......@@ -129,17 +129,17 @@ to access to configuration.
Manager:
--------
Apache::Session, MIME::Base64, CGI, LWP::UserAgent, DBI, XML::Simple,
Apache::Session, MIME::Base64, CGI, LWP::UserAgent, DBI,
SOAP::Lite, XML::LibXML, XML::LibXSLT, Lemonldap::NG::Common
With Debian:
apt-get install perl-modules libxml-simple-perl libdbi-perl libwww-perl
apt-get install perl-modules libdbi-perl libwww-perl
# If you want to use SOAP
apt-get install libsoap-lite-perl
Portal:
-------
Apache::Session, Net::LDAP, MIME::Base64, CGI, Cache::Cache, DBI, XML::Simple,
Apache::Session, Net::LDAP, MIME::Base64, CGI, Cache::Cache, DBI,
SOAP::Lite, HTML::Template, XML::LibXML, Lemonldap::NG::Common
With Debian:
......@@ -148,7 +148,7 @@ With Debian:
Handler:
--------
Apache::Session, MIME::Base64, CGI, LWP::UserAgent, Cache::Cache, DBI,
XML::Simple, SOAP::Lite, Lemonldap::NG::Common
SOAP::Lite, Lemonldap::NG::Common
With Debian:
apt-get install libapache-session-perl libwww-perl libcache-cache-perl
......
......@@ -96,6 +96,9 @@ APACHEFILENOTIFDIR=$(DATADIR)/notifications
# LL::NG captcha dir
CAPTCHADIR=$(DATADIR)/captcha
# LL::NG cache dir
CACHEDIR=$(DATADIR)/cache
# Apache user/group
APACHEUSER=
APACHEGROUP=
......@@ -133,6 +136,9 @@ LLNGTESTLDAP_SLAPD_BIN=/usr/sbin/slapd
LLNGTESTLDAP_SLAPADD_BIN=/usr/sbin/slapadd
LLNGTESTLDAP_SCHEMA_DIR=/etc/ldap/schema
# Default website destination
WEBSITE_DIR=doc/sources/admin/_build/html
# Other
SRCCOMMONDIR=lemonldap-ng-common
SRCHANDLERDIR=lemonldap-ng-handler
......@@ -175,6 +181,7 @@ RAPACHEPSESSIONFILEDIR=$(DESTDIR)/$(APACHEPSESSIONFILEDIR)
RAPACHEPSESSIONFILELOCKDIR=$(DESTDIR)/$(APACHEPSESSIONFILELOCKDIR)
RFILENOTIFDIR=$(DESTDIR)/$(APACHEFILENOTIFDIR)
RCAPTCHADIR=$(DESTDIR)/$(CAPTCHADIR)
RCACHEDIR=$(DESTDIR)/$(CACHEDIR)
RFASTCGISOCKDIR=$(DESTDIR)/$(FASTCGISOCKDIR)
VERSION=`head -n1 changelog |sed -e 's/lemonldap-ng (//' -e 's/).*$$//'`
......@@ -255,7 +262,7 @@ CSSDSTFILES=$(CSSSRCFILES:.css=.min.css)
# - packaging targets
# - developper corner
all: configure common handler manager portal
all: configure common handler manager portal documentation
@echo
@echo "Building succeed. Now run :"
@echo " - 'make test' to verify your installation"
......@@ -321,9 +328,11 @@ $(SRCMANAGERDIR)/site/htdocs/static/js/%.js: $(SRCMANAGERDIR)/site/coffee/%.coff
%.min.js: %.js
@echo "Compressing $*.js"
if test "$(UGLIFYJSVERSION)" = 2; then \
uglifyjs $*.js --compress --mangle --comments='/Copyr/i' --source-map $*.min.js.map -o $*.min.js; \
cd `dirname $*`; \
uglifyjs `basename $*`.js --compress --mangle --comments '/Copyr/i' --source-map `basename $*`.min.js.map -o `basename $*`.min.js; \
else \
uglifyjs $*.js --compress --mangle --comments='/Copyr/i' --source-map -o $*.min.js; \
cd `dirname $*`; \
uglifyjs `basename $*`.js --compress --mangle --comments '/Copyr/i' --source-map -o `basename $*`.min.js; \
fi
fastcgi-server/man/llng-fastcgi-server.8p: fastcgi-server/sbin/llng-fastcgi-server
......@@ -357,7 +366,10 @@ portal_conf: ${SRCPORTALDIR}/Makefile
manager_conf: ${SRCMANAGERDIR}/Makefile
${SRCCOMMONDIR}/Makefile:
@cd ${SRCCOMMONDIR}; LMNGCONFFILE=$(STORAGECONFFILE) $(PERL) Makefile.PL $(PERLOPTIONS)
@cd ${SRCCOMMONDIR}; \
LMNGCONFFILE=$(STORAGECONFFILE) \
LMNGCONFDIR=$(FILECONFIGDIR) \
$(PERL) Makefile.PL $(PERLOPTIONS)
${SRCHANDLERDIR}/Makefile:
@cd ${SRCHANDLERDIR}; $(PERL) Makefile.PL $(PERLOPTIONS)
......@@ -637,17 +649,30 @@ install_bin: install_conf_dir
${SRCCOMMONDIR}/scripts/rotateOidcKeys \
${SRCMANAGERDIR}/scripts/lmConfigEditor \
${SRCCOMMONDIR}/scripts/lemonldap-ng-cli \
${SRCCOMMONDIR}/scripts/lemonldap-ng-sessions \
${SRCCOMMONDIR}/scripts/importMetadata \
$(RBINDIR)
@if [ ! "$(APACHEUSER)" ]; then \
$(PERL) -i -pe 's#__APACHEUSER__#nobody#g;' $(RBINDIR)/lmConfigEditor $(RBINDIR)/lemonldap-ng-cli; \
$(PERL) -i -pe 's#__APACHEUSER__#nobody#g;' \
$(RBINDIR)/lmConfigEditor \
$(RBINDIR)/lemonldap-ng-cli \
$(RBINDIR)/lemonldap-ng-sessions; \
else \
$(PERL) -i -pe 's#__APACHEUSER__#$(APACHEUSER)#g;' $(RBINDIR)/lmConfigEditor $(RBINDIR)/lemonldap-ng-cli; \
$(PERL) -i -pe 's#__APACHEUSER__#$(APACHEUSER)#g;' \
$(RBINDIR)/lmConfigEditor \
$(RBINDIR)/lemonldap-ng-cli \
$(RBINDIR)/lemonldap-ng-sessions; \
fi
@if [ ! "$(APACHEGROUP)" ]; then \
$(PERL) -i -pe 's#__APACHEGROUP__#nobody#g;' $(RBINDIR)/lmConfigEditor $(RBINDIR)/lemonldap-ng-cli; \
$(PERL) -i -pe 's#__APACHEGROUP__#nobody#g;' \
$(RBINDIR)/lmConfigEditor \
$(RBINDIR)/lemonldap-ng-cli \
$(RBINDIR)/lemonldap-ng-sessions; \
else \
$(PERL) -i -pe 's#__APACHEGROUP__#$(APACHEGROUP)#g;' $(RBINDIR)/lmConfigEditor $(RBINDIR)/lemonldap-ng-cli; \
$(PERL) -i -pe 's#__APACHEGROUP__#$(APACHEGROUP)#g;' \
$(RBINDIR)/lmConfigEditor \
$(RBINDIR)/lemonldap-ng-cli \
$(RBINDIR)/lemonldap-ng-sessions; \
fi
@chmod +x $(RBINDIR)/*
......@@ -726,7 +751,7 @@ install_site: install_manager_site install_portal_site install_handler_site inst
@echo "5 - Connect to Manager at http://manager.${DNSDOMAIN}/ to edit configuration"
@echo
@if [ ! "$(APACHEUSER)" ]; then \
echo;echo " Warning, since APACHEUSER was not set, $(APACHESESSIONFILEDIR), $(APACHEPSESSIONFILEDIR), $(CAPTCHADIR) and $(CONFDIR) have permissive permissions."; \
echo;echo " Warning, since APACHEUSER was not set, $(APACHESESSIONFILEDIR), $(APACHEPSESSIONFILEDIR), $(CAPTCHADIR), $(CACHEDIR) and $(CONFDIR) have permissive permissions."; \
echo " Fix them by yourself to restrict their view to apache process only"; \
fi
@echo
......@@ -876,8 +901,6 @@ install_doc_site:
@cd doc && for f in `find * -type f ! -name '*.html'`; do \
install -v -m 644 $$f $(RDEFDOCDIR)/$$f; \
done && cd -
# Install symlinks
@cd doc && tar cf - `find * -type l` | tar xvf - -C $(RDEFDOCDIR) && cd -
# Remove js
@cd $(RDEFDOCDIR) && if test "$(USEEXTERNALLIBS)" = "yes"; then \
rm -rvf $(DOCEXTERNALLIBS); \
......@@ -885,7 +908,7 @@ install_doc_site:
rm -rvf $(DOCLIBSTOREMOVEFORDEBIAN); \
fi && cd -
install_conf_dir: install_sessions_dir install_notif_dir install_captcha_dir
install_conf_dir: install_sessions_dir install_notif_dir install_captcha_dir install_cache_dir
# Configuration files install
@install -v -d $(RCONFDIR) $(RFILECONFIGDIR) $(RTOOLSDIR)
@if [ "$(ERASECONFIG)" -eq "1" ]; then \
......@@ -896,7 +919,8 @@ install_conf_dir: install_sessions_dir install_notif_dir install_captcha_dir
@$(PERL) -i -pe 's/__DNSDOMAIN__/$(DNSDOMAIN)/g;\
s#__SESSIONDIR__#$(APACHESESSIONFILEDIR)#g;\
s#__PSESSIONDIR__#$(APACHEPSESSIONFILEDIR)#g;\
s#__NOTIFICATIONDIR__#$(APACHEFILENOTIFDIR)#g;' $(RFILECONFIGDIR)/lmConf-1.json
s#__NOTIFICATIONDIR__#$(APACHEFILENOTIFDIR)#g;\
s#__CACHEDIR__#$(CACHEDIR)#g;' $(RFILECONFIGDIR)/lmConf-1.json
@if [ "$(APACHEUSER)" != "" ]; then \
chown $(APACHEUSER) $(RFILECONFIGDIR) || exit 1; \
if [ "$(APACHEGROUP)" != "" ]; then \
......@@ -908,7 +932,8 @@ install_conf_dir: install_sessions_dir install_notif_dir install_captcha_dir
fi
@cp $(SRCCOMMONDIR)/tools/lmConfig.* $(SRCCOMMONDIR)/tools/apache-session-mysql.sql $(RTOOLSDIR)
@cp $(SRCCOMMONDIR)/tools/sso.schema $(RTOOLSDIR)
$(PERL) -i -pe 's/__DNSDOMAIN__/$(DNSDOMAIN)/g' $(RCONFDIR)/$(CONFFILENAME)
$(PERL) -i -pe 's/__DNSDOMAIN__/$(DNSDOMAIN)/g; s#__CACHEDIR__#$(CACHEDIR)#g;' \
$(RCONFDIR)/$(CONFFILENAME)
@rm -rf $$(find $(RCONFDIR) $(RFILECONFIGDIR) $(RTOOLSDIR) -type d -name .svn)
install_sessions_dir:
......@@ -950,6 +975,19 @@ install_captcha_dir:
chmod 777 $(RCAPTCHADIR); \
fi
install_cache_dir:
@install -m 777 -v -d $(RCACHEDIR)
# Fix captcha directory permissions
@if [ "$(APACHEUSER)" != "" ]; then \
chown $(APACHEUSER) $(RCACHEDIR) || exit 1; \
if [ "$(APACHEGROUP)" != "" ]; then \
chgrp $(APACHEGROUP) $(RCACHEDIR) || exit 1; \
fi; \
chmod 770 $(RCACHEDIR); \
else \
chmod 777 $(RCACHEDIR); \
fi
postconf_hosts:
@cat ${CONFDIR}/for_etc_hosts >> /etc/hosts
@echo "/etc/hosts was updated"
......@@ -999,6 +1037,8 @@ distclean: clean
clean: common_clean handler_clean portal_clean manager_clean stop_web_server
@rm -f $$(find */ -name '*bak' -delete)
@rm -rf doc/devel
@rm -rf doc/pages/documentation/current/*
@rm -rf "$(WEBSITE_DIR)"
@rm -vf *gz *zip
@rm -rf lemonldap-ng-$(VERSION)
@echo "Cleaned"
......@@ -1127,7 +1167,17 @@ manager_cpan: manager_conf
@mv ${SRCMANAGERDIR}/Lemonldap*.gz .
documentation:
@cd doc/ && ../scripts/doc.pl
@if [ "$(SKIP_DOCUMENTATION)" ] ; then \
echo "Skipped documentation building" ;\
else \
sphinx-build -b html -d /tmp/doctrees \
-Dhtml_theme=bootstrap\
doc/sources/admin/ doc/pages/documentation/current/ ;\
fi
website_documentation:
LLNGSPHINXWEBSITE=1 sphinx-build -b html -d /tmp/doctrees \
doc/sources/admin/ "$(WEBSITE_DIR)"
test-diff:
@for file in `find lemonldap-ng-*/lib -type f`; do \
......@@ -1183,3 +1233,11 @@ e2e_cert:
-reqexts SAN \
-extensions SAN \
-config e2e-tests/openssl.cnf
api_doc: doc/sources/manager-api/openapi-spec.yaml doc/sources/manager-api/config-codegen.json
@if [ -f "$(SWAGGER_CODEGEN)" ] ; then \
java -jar "$(SWAGGER_CODEGEN)" generate -i doc/sources/manager-api/openapi-spec.yaml -l html2 -o doc/pages/manager-api/ -c doc/sources/manager-api/config-codegen.json; \
else \
echo "Please run me with SWAGGER_CODEGEN=/path/to/swagger-codegen.jar"; \
fi
......@@ -23,16 +23,9 @@ Before release
$ ./scripts/download_translations
- Update documentation:
$ ./scripts/parameters-for-wiki.pl >/tmp/prmlist.txt
Replace https://lemonldap-ng.org/documentation/X.X/parameterlist by
/tmp/prmlist.txt content
$ make documentation
$ ./scripts/parameters-for-doc.pl > doc/sources/admin/parameterlist.rst
- Update changelog:
$ ./scripts/generate-changelog.pl
This update "changelog" file using GitLab issues (tags Bug, New feature,
......@@ -56,10 +49,6 @@ For major release
- Go on gitlab and create a new tag: https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/tags/new
- Change "latest" symlink in dokuwiki
- Edit scripts/doc.pl in trunk to point on the new documentation path
Make the distribution
---------------------
......@@ -89,7 +78,6 @@ Packages are in /tmp
Sign packages:
$ dpkg-sig -p --sign builder /tmp/*.deb
Upload the distribution
---------------------
......@@ -125,6 +113,7 @@ Site
- Update links on the download page
- Close the milestone on Gitlab and create a new one
- Update admin documentation and API documentation
Spread the word
---------------
......
......@@ -115,7 +115,7 @@
"localSessionStorage" : "Cache::FileCache",
"localSessionStorageOptions" : {
"cache_depth" : 3,
"cache_root" : "/tmp",
"cache_root" : "__CACHEDIR__",
"default_expires_in" : 600,
"directory_umask" : "007",
"namespace" : "lemonldap-ng-sessions"
......
......@@ -40,6 +40,7 @@
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
RewriteCond "%{REQUEST_URI}" "!^/(?:doc)"
RewriteRule "^/(.+)$" "/api.fcgi/$1" [PT]
# 2) FastCGI engine
......@@ -83,6 +84,15 @@
</IfModule>
</Location>
# On-line documentation
Alias /doc/ __DEFDOCDIR__
<Directory __DEFDOCDIR__>
Require all granted
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
DirectoryIndex index.html start.html
</Directory>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -40,6 +40,7 @@
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
RewriteCond "%{REQUEST_URI}" "!^/(?:doc)"
RewriteRule "^/(.+)$" "/api.fcgi/$1" [PT]
# 2) FastCGI engine
......@@ -90,6 +91,21 @@
</IfModule>
</Location>
# On-line documentation
Alias /doc/ __DEFDOCDIR__
<Directory __DEFDOCDIR__>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
DirectoryIndex index.html start.html
</Directory>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -40,6 +40,7 @@
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
RewriteCond "%{REQUEST_URI}" "!^/(?:doc)"
RewriteRule "^/(.+)$" "/api.fcgi/$1" [PT]
# 2) FastCGI engine
......@@ -84,6 +85,16 @@
</IfModule>
</Location>
# On-line documentation
Alias /doc/ __DEFDOCDIR__
<Directory __DEFDOCDIR__>
Order allow,deny
Allow from all
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
DirectoryIndex index.html start.html
</Directory>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -15,7 +15,13 @@ server {
#set_real_ip_from 127.0.0.1;
#real_ip_header X-Forwarded-For;
rewrite ^/(.*)$ /api.psgi/$1 break;
location /doc/ {
alias /usr/share/doc/lemonldap-ng-doc/;
index index.html start.html;
}
location / {
rewrite ^/(.*)$ /api.psgi/$1;
}
location ~ ^(?<sc>/.*\.psgi)(?:$|/) {
......@@ -37,17 +43,18 @@ server {
# Uncomment this if you use https only
#add_header Strict-Transport-Security "max-age=15768000";
# By default, access to this VHost is denied
# If you want to enable the manager APIs, you MUST
# implement a robust authentication scheme to protect this
# VHost since LemonLDAP::NG provides no protection to the
# Manager APIs yet
#
#allow 127.0.0.0/8;
#allow ::1/128;
deny all;
}
# By default, access to this VHost is denied
# If you want to enable the manager APIs, you MUST
# implement a robust authentication scheme to protect this
# VHost since LemonLDAP::NG provides no protection to the
# Manager APIs yet
#
#allow 127.0.0.0/8;
#allow ::1/128;
deny all;
# DEBIAN
# If install was made with USEDEBIANLIBS (official releases), uncomment this
#location /javascript/ {
......