Line 133: |
Line 133: |
| * sudo pct list : list of containers | | * sudo pct list : list of containers |
| * sudo pct enter 101 : enter container 101 | | * sudo pct enter 101 : enter container 101 |
| + | |
| + | == Reverse proxy setup to access a web server on a container == |
| + | |
| + | To access a web server running on a container (e.g. 111), requests have first to pass through a nginx reverse proxy running on container 101: |
| + | |
| + | * create a CNAME record pointing the desired domain (e.g. metabase.openfoodfacts.org) to ovh1.openfoodfacts.org. |
| + | * enter container 101 to setup the reverse proxy: |
| + | ** copy one of the existing config files (e.g. feedme.conf): |
| + | *** root@proxy:/etc/nginx/conf.d# cp feedme.conf metabase.conf |
| + | ** edit the config file |
| + | *** replace the domain name, directories, and target container (and possibly port) |
| + | *** remove the lines that load the SSL certificate (as it does not exist yet) |
| + | ** create the SSL certificate |
| + | *** root@proxy:/etc/nginx/conf.d# certbot --nginx |
| | | |
| = See also, inspirations = | | = See also, inspirations = |
| * [https://wiki.openstreetmap.org/wiki/FR:Serveurs_OpenStreetMap_France FR:Serveurs OpenStreetMap France] (french) | | * [https://wiki.openstreetmap.org/wiki/FR:Serveurs_OpenStreetMap_France FR:Serveurs OpenStreetMap France] (french) |
| * [https://wiki.openstreetmap.org/wiki/FR:Serveurs/Utilisation_des_serveurs FR:Serveurs/Utilisation des serveurs] (french) | | * [https://wiki.openstreetmap.org/wiki/FR:Serveurs/Utilisation_des_serveurs FR:Serveurs/Utilisation des serveurs] (french) |