Skip to content

Commit 05a57ed

Browse files
authored
Merge pull request #238 from ocsigen/config
Using Ocsigen Server without configuration file (and with static linking)
2 parents 2433a6d + 50bf9e4 commit 05a57ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1280
-820
lines changed

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=0.26.1
1+
version=0.26.2
22
break-cases = fit
33
break-collection-expressions = fit-or-vertical
44
break-fun-decl = wrap

Makefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
include Makefile.options
21
include Makefile.config
2+
include Makefile.options
33

44
### Building
55

6-
.PHONY: default all
6+
.PHONY: default all doc
77
default all: build
88

99
.PHONY: build
@@ -74,13 +74,6 @@ install.files:
7474
@echo
7575
@echo "## Run \"make doc\" and \"make install.doc\" to build and install the ocamldoc."
7676
@echo INSTALL_CAN_PUT_PERMISSIONS: ${INSTALL_CAN_PUT_PERMISSIONS}
77-
## Command pipe
78-
$(INSTALL) -m ${INSTALL_MOD_755} -d $(dir $(TEMPROOT)$(COMMANDPIPE))
79-
[ -p $(TEMPROOT)$(COMMANDPIPE) ] || \
80-
{ mkfifo -m ${INSTALL_MOD_660} $(TEMPROOT)$(COMMANDPIPE); \
81-
if [ "${INSTALL_CAN_PUT_PERMISSIONS}" = yes ]; \
82-
then $(CHOWN) -R $(OCSIGENUSER):"$(OCSIGENGROUP)" $(TEMPROOT)$(COMMANDPIPE); \
83-
fi; }
8477
## Configuration files
8578
$(INSTALL) -m ${INSTALL_MOD_755} -d $(TEMPROOT)$(CONFIGDIR)/conf.d
8679
${INSTALL} -m ${INSTALL_MOD_644} ocsigenserver.conf.sample $(TEMPROOT)$(CONFIGDIR)/

Makefile.options

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ INCS= -I ${BLD}/server/.ocsigenserver.objs/byte \
2323
## ${SERVER_PACKAGE} is not only used to build the 'ocsigenserver' executable
2424
## but also to generate src/baselib/ocsigen_config_static.ml
2525

26-
SERVER_PACKAGE := lwt_ssl,bytes,lwt.unix,lwt_log,ipaddr,findlib,cryptokit,re,str,xml-light,dynlink,cohttp-lwt-unix,hmap
26+
SERVER_PACKAGE := lwt_ssl,bytes,lwt.unix,lwt_log,ipaddr,findlib,cryptokit,re,str,xml-light,dynlink,cohttp-lwt-unix
2727

2828
LIBS := -package ${SERVER_PACKAGE} ${INCS}
2929

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.2
1+
6.0.0

doc/Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ DOC := baselib/ocsigen_cache.mli \
1717
http/ocsigen_header.mli \
1818
\
1919
server/ocsigen_config.mli \
20+
server/ocsigen_command.mli \
2021
server/ocsigen_request.mli \
2122
server/ocsigen_response.mli \
2223
server/ocsigen_messages.mli \
@@ -26,10 +27,17 @@ DOC := baselib/ocsigen_cache.mli \
2627
server/ocsigen_local_files.mli \
2728
server/ocsigen_server.mli
2829

29-
PLUGINS_DOC := extensions/accesscontrol.mli extensions/authbasic.mli \
30-
extensions/outputfilter.mli \
31-
extensions/redirectmod.mli extensions/staticmod.mli \
32-
extensions/deflatemod/deflatemod.mli
30+
PLUGINS_DOC := extensions/accesscontrol.mli \
31+
extensions/authbasic.mli \
32+
extensions/outputfilter.mli \
33+
extensions/extendconfiguration.mli \
34+
extensions/redirectmod.mli \
35+
extensions/rewritemod.mli \
36+
extensions/userconf.mli \
37+
extensions/revproxy.mli \
38+
extensions/staticmod.mli \
39+
extensions/deflatemod.mli \
40+
extensions/cors.mli
3341

3442
all: doc wikidoc
3543

doc/indexdoc

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
{1 Ocsigen server - API reference}
2+
{!modules:
3+
Ocsigen_server
4+
}
5+
{2 Extensions}
6+
{!modules:
7+
Staticmod
8+
Extendconfiguration
9+
Accesscontrol
10+
Authbasic
11+
Deflatemod
12+
Redirectmod
13+
Revproxy
14+
Rewritemod
15+
Outputfilter
16+
Userconf
17+
Cors
18+
}
219

320
{2 Persistent data, writing in the logs, configuration file extension, polymorphic tables}
421
{!modules:
@@ -14,10 +31,8 @@ Ocsigen_config
1431
{!modules:
1532
Ocsigen_extensions
1633
Ocsigen_local_files
17-
Ocsigen_headers
34+
Ocsigen_header
1835
Ocsigen_stream
19-
Ocsigen_comet
20-
Authbasic
2136
}
2237

2338
{2 Indexes}

ocsigenserver.opam

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opam-version: "2.0"
22
name: "ocsigenserver"
3-
version: "5.1.2"
3+
version: "6.0.0"
44
maintainer: "[email protected]"
55
synopsis: "A full-featured and extensible Web server"
66
description: "Ocsigen Server implements most features of the HTTP protocol, and has a very powerful extension mechanism that makes it very easy to plug your own OCaml modules for generating pages. Many extensions are already implemented, like a reverse proxy, content compression, access control, authentication, etc."
@@ -59,7 +59,6 @@ depends: [
5959
"ipaddr" {>= "2.1"}
6060
"cohttp-lwt-unix" {>= "5.0.0" & < "6.0.0~"}
6161
"conduit-lwt-unix" {>= "2.0.0"}
62-
"hmap"
6362
"xml-light"
6463
"camlzip"
6564
]

src/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ confs: ../ocsigenserver.conf.sample ../local/etc/ocsigenserver.conf
1212
cat $< \
1313
| sed s%_LOGDIR_%$(LOGDIR)%g \
1414
| sed s%_DATADIR_%$(DATADIR)%g \
15-
| sed s%_OCSIGENUSER_%$(OCSIGENUSER)%g \
16-
| sed s%_OCSIGENGROUP_%"$(OCSIGENGROUP)"%g \
1715
| sed s%_COMMANDPIPE_%$(COMMANDPIPE)%g \
1816
| sed s%_MIMEFILE_%$(CONFIGDIR)/mime.types%g \
1917
| sed s%_METADIR_%$(LIBDIR)%g \
@@ -30,8 +28,6 @@ confs: ../ocsigenserver.conf.sample ../local/etc/ocsigenserver.conf
3028
| sed s%80\</port\>%8080\</port\>%g \
3129
| sed s%_LOGDIR_%$(SRC)/local/var/log%g \
3230
| sed s%_DATADIR_%$(SRC)/local/var/lib%g \
33-
| sed s%\<user\>_OCSIGENUSER_\</user\>%%g \
34-
| sed s%\<group\>_OCSIGENGROUP_\</group\>%%g \
3531
| sed s%_COMMANDPIPE_%$(SRC)/local/var/run/ocsigenserver_command%g \
3632
| sed s%_MIMEFILE_%$(SRC)/src/files/mime.types%g \
3733
| sed s%_METADIR_%${LIBDIR}\"/\>\<findlib\ path=\"$(SRC)/src/files/\"/\>\<findlib\ path=\"$(SRC)/src/extensions/files/%g \

src/baselib/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ ocsigen_config_static.ml: ocsigen_config_static.ml.in ../../Makefile.config ../.
2424
| sed s%_EXTDIR_%$(LIBDIR)/ocsigenserver/extensions%g \
2525
| sed s%_STATICPAGESDIR_%$(STATICPAGESDIR)% \
2626
| sed s%_UP_%$(UPLOADDIR)%g \
27-
| sed s%_OCSIGENUSER_%$(OCSIGENUSER)%g \
28-
| sed s%_OCSIGENGROUP_%"$(OCSIGENGROUP)"%g \
2927
| sed s%_COMMANDPIPE_%$(COMMANDPIPE)%g \
3028
| sed s%_CONFIGDIR_%$(CONFIGDIR)% \
3129
| sed s%_ISNATIVE_%$(NATIVECODE_RUNTIME_DETECT)%g \

src/baselib/ocsigen_config_static.ml.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ let version_number = "_VERSION_"
2222
let config_file = ref "_CONFIGDIR_/ocsigenserver.conf"
2323
let is_native = Sys.backend_type = Sys.Native
2424
let logdir = ref (Some "_LOGDIR_")
25-
let default_user = ref "_OCSIGENUSER_"
26-
let default_group = ref "_OCSIGENGROUP_"
2725
let mimefile = ref "_CONFIGDIR_/mime.types"
2826
let datadir = ref "_DATADIR_"
2927
let bindir = ref "_BINDIR_"

0 commit comments

Comments
 (0)