diff --git a/Makefile b/Makefile index ea71890dc8..67ff56b28e 100644 --- a/Makefile +++ b/Makefile @@ -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" @@ -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" diff --git a/doc/manual/install-domserver.rst b/doc/manual/install-domserver.rst index f862a80a91..f6a4eb2e18 100644 --- a/doc/manual/install-domserver.rst +++ b/doc/manual/install-domserver.rst @@ -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 @@ -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 `, but also @@ -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 /etc/apache.conf /etc/apache2/conf-available/domjudge.conf - ln -s /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: @@ -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 /etc/apache.conf /etc/apache2/conf-available/domjudge.conf + ln -s /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. diff --git a/doc/manual/quick-install.rst b/doc/manual/quick-install.rst index 49569eb63f..dfc59ffb32 100644 --- a/doc/manual/quick-install.rst +++ b/doc/manual/quick-install.rst @@ -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 /etc/apache.conf /etc/apache2/conf-available/domjudge.conf + sudo ln -s /etc/nginx-conf /etc/nginx/sites-enabled/domjudge sudo ln -s /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 /etc/nginx-conf /etc/nginx/sites-enabled/domjudge + sudo ln -s /etc/apache.conf /etc/apache2/conf-available/domjudge.conf sudo ln -s /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.