Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ inplace-install-l:
@echo "========== Maintainer Install Completed =========="
@echo ""
@echo "Next:"
@echo " - Configure apache2"
@echo " sudo make inplace-postinstall-apache"
@echo " - Configure nginx"
@echo " sudo make inplace-postinstall-nginx"
@echo " - Configure apache2"
@echo " sudo make inplace-postinstall-apache"
@echo " - Configure judgedaemon"
@echo " sudo make inplace-postinstall-judgedaemon"
@echo " - Set up database"
Expand All @@ -258,16 +258,16 @@ inplace-install-l:
@echo " setfacl -R -m d:u:$(DOMJUDGE_USER):rwx $(CURDIR)/webapp/var"
@echo " setfacl -R -m u:$(DOMJUDGE_USER):rwx $(CURDIR)/webapp/var"
@echo " - Configure webserver"
@echo " Apache 2:"
@echo " ln -sf $(CURDIR)/etc/apache.conf /etc/apache2/conf-available/domjudge.conf"
@echo " a2enconf domjudge"
@echo " a2enmod rewrite headers"
@echo " systemctl restart apache2"
@echo " Nginx + PHP-FPM:"
@echo " ln -sf $(CURDIR)/etc/nginx-conf /etc/nginx/sites-enabled/"
@echo " ln -sf $(CURDIR)/etc/domjudge-fpm /etc/php/$(PHPVERSION)/fpm/pool.d/domjudge.conf"
@echo " systemctl restart nginx"
@echo " systemctl restart php-fpm"
@echo " Apache 2:"
@echo " ln -sf $(CURDIR)/etc/apache.conf /etc/apache2/conf-available/domjudge.conf"
@echo " a2enconf domjudge"
@echo " a2enmod rewrite headers"
@echo " systemctl restart apache2"
@echo ""
@echo "The admin password for the web interface is in etc/initial_admin_password.secret"

Expand Down
40 changes: 20 additions & 20 deletions doc/manual/install-domserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For your convenience, the following command will install the necessary
software on the DOMjudge server as mentioned above when using Debian
GNU/Linux, or one of its derivative distributions like Ubuntu::

sudo apt install libcgroup-dev make acl zip unzip pv mariadb-server apache2 \
sudo apt install libcgroup-dev make acl zip unzip pv mariadb-server nginx \
php php-fpm php-gd php-cli php-intl php-mbstring php-mysql \
php-curl php-json php-xml php-zip composer ntp python3-yaml php-bcmath

Expand All @@ -46,7 +46,7 @@ Red Hat Enterprise Linux and Rocky Linux (before V9)::
php-gd php-cli php-intl php-mbstring php-mysqlnd php-fpm \
php-xml php-zip composer chronyd python3-pyyaml php-bcmath

`nginx` can be used as an alternate web server.
`apache2` can be used as an alternate web server.

The packages `libcgroup-dev` (`libcgroup-devel` on Fedora) and `make` are
:ref:`judgehost software requirements <judgehost_software>`, but also
Expand Down Expand Up @@ -109,24 +109,7 @@ with it. Refer to the documentation of your web server and PHP for
details. In the examples below, replace |phpversion| with the PHP version
you're installing.

To configure the Apache web server for DOMjudge, use the Apache
configuration snippet from ``etc/apache.conf``. It contains
examples for configuring the DOMjudge pages with an alias directive,
or as a virtualhost, optionally with TLS; it also contains PHP and security
settings. Reload the web server for changes to take effect.

.. parsed-literal::

ln -s <DOMSERVER_INSTALL_PATH>/etc/apache.conf /etc/apache2/conf-available/domjudge.conf
ln -s <DOMSERVER_INSTALL_PATH>/etc/domjudge-fpm.conf /etc/php/|phpversion|/fpm/pool.d/domjudge.conf
a2enmod proxy_fcgi setenvif rewrite
a2enconf php\ |phpversion|-fpm domjudge
# Edit the file /etc/apache2/conf-available/domjudge.conf and
# /etc/php/\ |phpversion|/fpm/pool.d/domjudge.conf to your needs
service php\ |phpversion|-fpm reload
service apache2 reload

An nginx webserver configuration snippet is also provided in
To configure the nginx web server for DOMjudge, use the nginx configuration snippet in
``etc/nginx-conf``. You still need ``htpasswd`` from ``apache2-utils``
though. To use this configuration, perform the following steps:

Expand All @@ -150,6 +133,23 @@ On Fedora, use the following nginx configuration steps:
systemctl restart php-fpm.service
systemctl restart nginx.service

To configure the Apache web server for DOMjudge, use the Apache
configuration snippet from ``etc/apache.conf``. It contains
examples for configuring the DOMjudge pages with an alias directive,
or as a virtualhost, optionally with TLS; it also contains PHP and security
settings. Reload the web server for changes to take effect.

.. parsed-literal::

ln -s <DOMSERVER_INSTALL_PATH>/etc/apache.conf /etc/apache2/conf-available/domjudge.conf
ln -s <DOMSERVER_INSTALL_PATH>/etc/domjudge-fpm.conf /etc/php/|phpversion|/fpm/pool.d/domjudge.conf
a2enmod proxy_fcgi setenvif rewrite
a2enconf php\ |phpversion|-fpm domjudge
# Edit the file /etc/apache2/conf-available/domjudge.conf and
# /etc/php/\ |phpversion|/fpm/pool.d/domjudge.conf to your needs
service php\ |phpversion|-fpm reload
service apache2 reload

The judgehosts connect to DOMjudge via the DOMjudge API so need
to be able to access at least this part of the web interface.

Expand Down
16 changes: 8 additions & 8 deletions doc/manual/quick-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@ DOMserver
* Install the MySQL database using e.g.
``bin/dj_setup_database -u root -r install``.

* For Apache: add ``etc/apache.conf`` to your Apache configuration and
* For nginx: add ``etc/nginx-conf`` to your nginx configuration and
add ``etc/domjudge-fpm.conf`` to your PHP FPM pool directory, edit
it to your needs, reload web server

.. parsed-literal::

sudo ln -s <DOMSERVER_INSTALL_PATH>/etc/apache.conf /etc/apache2/conf-available/domjudge.conf
sudo ln -s <DOMSERVER_INSTALL_PATH>/etc/nginx-conf /etc/nginx/sites-enabled/domjudge
sudo ln -s <DOMSERVER_INSTALL_PATH>/etc/domjudge-fpm.conf /etc/php/\ |phpversion|/fpm/pool.d/domjudge.conf
sudo a2enmod proxy_fcgi setenvif rewrite
sudo a2enconf php\ |phpversion|-fpm domjudge
sudo service php\ |phpversion|-fpm reload
sudo service apache2 reload
sudo service nginx reload

* For nginx: add ``etc/nginx-conf`` to your nginx configuration and
* For Apache: add ``etc/apache.conf`` to your Apache configuration and
add ``etc/domjudge-fpm.conf`` to your PHP FPM pool directory, edit
it to your needs, reload web server

.. parsed-literal::

sudo ln -s <DOMSERVER_INSTALL_PATH>/etc/nginx-conf /etc/nginx/sites-enabled/domjudge
sudo ln -s <DOMSERVER_INSTALL_PATH>/etc/apache.conf /etc/apache2/conf-available/domjudge.conf
sudo ln -s <DOMSERVER_INSTALL_PATH>/etc/domjudge-fpm.conf /etc/php/\ |phpversion|/fpm/pool.d/domjudge.conf
sudo a2enmod proxy_fcgi setenvif rewrite
sudo a2enconf php\ |phpversion|-fpm domjudge
sudo service php\ |phpversion|-fpm reload
sudo service nginx reload
sudo service apache2 reload

* Check that the web interface works (/team, /public and /jury).
* Check that the API (/api) works and create credentials for the judgehosts.
Expand Down
Loading