Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 07ec4e1006689824c37b6ae5b69626c7 > files > 164

ocsigenserver-doc-2.2.0-5.mga4.noarch.rpm

<<header |
  = Quickstart =
  <<outline>>
>>

== Installation ==

The easier way to install Ocsigenserver is to use the installation
tool from your distribution. Ocsigenserver is available for example in
Debian, Gentoo, FreeBSD... If your distribution is not shipping any
package we recommend to use Godi to install Ocsigen and all its
dependencies (including OCaml) or to use the [[wiki(2):install|Ocsigen
bunble]]. It is known to work on Linux, MacOS, FreeBSD, Solaris (but
has not been tested on Windows).

If you need to install it from source, [[wiki:install|download the
package]], and read instructions in the README file.

== Launch the server ==

Distributions usually provide a default configuration file called
{{{/etc/ocsigenserver/ocsigenserver.conf}}} (and possibly other
configuration files in {{{/etc/ocsigenserver/conf.d}}}).

If you are root on your system, and if no other server is running on
port 80, just launch the server using the configuration script from
your distribution, usually:

{{{
/etc/init.d/ocsigenserver start
}}}

or just type

{{{
ocsigenserver
}}}

A default Web site should be available at URL
{{{http://localhost/}}}. If another Web server is running on port 80,
just change the port number in the main configuration file.

If you want to run Ocsigen as an unprivileged user, you need to adapt
the configuration file to your rights. An example of configuration
file for users with restricted rights is given here. Copy it in a file
and adapt it to your needs. Use a port greater than 1024, for example
8080. Then run:

{{{
ocsigenserver -c //your_config_file//
}}}

and go to the URL {{{http://localhost:8080/}}} to see the default Web
site.

== Personalizing my configuration ==

Have a look at the page <<a_manual chapter="config"|Configuration>> to
learn how to personalize the configuration file and adapt it to your
needs.

The main extensions you need for basic use are:

;<<a_manual chapter="staticmod"|Staticmod>>
:for serving static pages,
;<<a_manual chapter="accesscontrol"|Accesscontrol>>
:if you need to restrict the access to the sites,
;<<a_manual chapter="eliom"|Eliom>>
:if you want to use dynamic Web sites written in OCaml with Eliom,
;<<a_manual chapter="cgimod"|CGImod>>
:if you want to use dynamic Web sites written as CGI scripts (for example one way to run PHP pages),
;<<a_manual chapter="revproxy"|Revproxy>>
:if you want to redirect some requests to another Web server, like Tomcat or Apache (another way to run PHP pages).

== Writing my own dynamic sites with Eliom ==

Eliom Web sites are OCaml compiled modules (.cmo or .cma, possibly
.cmxs with native code version) that are loaded dynamically from the
configuration file. The first section of the first part of Eliom's
tutorial explains how to write an "Hello World" with Eliom.

== If something goes wrong ==

If something goes wrong, first have a look in the logs to see if there
is an error message. The directory of logs is set in the configuration
file (usually {{{/var/log/ocsigenserver}}}).

If you can't find the solution in the documentation,
[[https://sympa.mancoosi.univ-paris-diderot.fr/wws/info/ocsigen|register
to our mailing list]] and ask your question here.

If you find a bug, a mistake in the documentation (even a small one),
or if you want to make a suggestion, [[site:trac|register to our bug
tracking system]] and fill a ticket.