Skip to content

Commit

Permalink
docs: double apache fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgarel committed Jan 10, 2025
1 parent 05df377 commit 72e40c5
Showing 1 changed file with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# 2024-09-02 OFF server double apache
# 2025-01-10 OFF server double apache

(initially started on 2024-09-02)

## Goal

Expand Down Expand Up @@ -43,25 +45,28 @@ See https://github.com/openfoodfacts/openfoodfacts-server/pull/10766
## Installation / Migration

1. checkout the new release / code
1. symlink new envvars: `ln -s /srv/opf/conf/apache-2.4/off-envvars /etc/apache2/`
1. change ports .conf link: `unlink /etc/apache2/ports.conf; ln -s /srv/opf/conf/apache-2.4/ports.conf /etc/apache2/`
2. symlink `ln -s /srv/$SERVICE/conf/systemd/[email protected] /etc/systemd/system/`
2. ensure mpm prefork symlink is the right one:
`unlink /etc/apache2/mods-available/mpm_prefork.conf; ln -s /srv/$SERVICE/conf/apache-2.4/mpm_prefork.conf /etc/apache2/mods-available/`
2. (off only) symlink `ln -s /etc/apache2 /etc/apache2-priority; ln -s /var/log/apache2 /var/log/apache2-priority`
2. check nginx configuration is ok (`nginx -t`)
1. `systemctl daemon-reload`
2. symlink `ln -s /etc/apache2 /etc/apache2-priority; ln -s /etc/apache2 /etc/apache2-standard`
2. symlink `ln -s /var/log/apache2 /var/log/apache2-priority; ln -s /var/log/apache2 /var/log/apache2-standard`
2. enable the [email protected] [email protected]
2. start [email protected]
2. and test it's working using `curl http://127.0.0.1:8002/display.pl -H "Host: world.openfoodfacts.org"`
`curl http://127.0.0.1:8002/display.pl?api/v2/product/3017620422003/ -H "Host: world.openfoodfacts.org"`
2. check nginx configuration is ok (`nginx -t`) and restart the service
2. (off only) enable [email protected]
2. (off only) start [email protected]
1. verify deployment `. env/env.$SERVICE; /srv/$SERVICE/scripts/deploy/verify-deployment.sh`
3. check priority apache2 is working:
`curl http://127.0.0.1:8002/cgi/display.pl?/ -H "Host: world.openfoodfacts.org"`
`curl http://127.0.0.1:8002/cgi/display.pl?api/v2/product/3017620422003/ -H "Host: world.openfoodfacts.org"`
2. stop and start apache2.service
2. restart nginx service
3. check both apache2 are working:
* `curl http://127.0.0.1/ -H "Host: world.openfoodfacts.org"`
* `curl http://127.0.0.1/discover -H "Host: world.openfoodfacts.org"`
2. stop apache2.service
2. start [email protected]
3. test it's working using curl commands above and using your browser
1. deactivate apache2.service
1. unlink the /etc/systemd/system/apache2.service
1. unlink /srv/$SERVER_NAME/log.conf
3. test it's working using your browser
2. (off only) enable and start monitoring of the [email protected]:
`systemctl enable --now [email protected]`

Celebrate !

Expand Down Expand Up @@ -198,3 +203,4 @@ as they log in different files.
**FIXME:** modify doc explaining off installation


**FIXME:** modify apache exporter config

0 comments on commit 72e40c5

Please sign in to comment.