Commit Graph

23 Commits

Author SHA1 Message Date
Julien Castiaux
3a3a224b17 [FIX] deploy: set Content-Security-Policy on static
The Content-Security-Policy[^1] http header was only set on the response
generated by controllers but it was missing from the `/<module>/static/`
route.

It is not strictly necessary to set that header on the responses comming
from that routes as it is not possible to add new static files or edit
existing ones via the interface (not even as admin). Only the developers
and system administrator can access those files.

It is also worth mentionning that using the Odoo internal web server to
deliver static files is suboptimal. Outside of a dev environment, those
files will typically be delivered via a web server[^2] and sysadmins
should configure their web server to set the CSP header on static images.

[^1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
[^2]: https://www.odoo.com/documentation/master/administration/install/deploy.html#serving-static-files-and-attachments

closes odoo/documentation#6954

X-original-commit: f3f44fe5f2
Related: odoo/odoo#146592
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-12-18 20:07:53 +00:00
Julien Castiaux
86bd9fd91b [FIX] deploy: nginx forwarded-host with tcp port
Install nginx using the nginx configuration found in the documentation
and changes the `listen` port to 8080. Start Odoo in `--proxy-mode`.

    listen 8080;
    server_name mycompany.odoo.com;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    location / {
            proxy_pass http://127.0.0.1:8069;
    }

Inside your browser, access "http://mycompany.odoo.com:8080" you are
wrongly redirected to "http://mycompany.odoo.com:80".

Odoo uses the `X-Forwarded-Host` http header value to generate new URls,
in this configuration `$host` only contains the domain (=hostname using
the urllib terminology) instead of the domain+port (=netloc). The
variable that contains both the domain and the port is actually
`$http_host`.

closes odoo/documentation#6944

Closes: odoo/odoo#64643
X-original-commit: 09c42c5896
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-12-18 20:07:52 +00:00
Martin Trigaux
23d4f4b901 [IMP] administration: add instructions to enable HSTS
closes odoo/documentation#6086

X-original-commit: 6a2725e604
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-10-12 16:12:12 +00:00
Julien Castiaux
90c86e6462 [IMP] deploy: reword multi-thread/process section
Many users don't start odoo-bin in --workers (multi-processing) mode but
instead leave the default configuration which use the development/demo
multi-threaded server, even in production.

This commit rewords the section about the difference between the
built-in servers and highlight the many advantages of the
multi-processing on. It repeats that information when it comes to
running a dedicated cron server, that it should use the multi-processing
server instead of the default multi-threading one.

closes odoo/documentation#5934

Fixes: odoo/odoo#88984
Closes: odoo/odoo#128571
X-original-commit: 8e9ae99423
Signed-off-by: Jonathan Castillo (jcs) <jcs@odoo.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-09-28 01:51:26 +00:00
Martin Trigaux
bde909aa17 [IMP] install: clarify Windows is not recommended for prod
It has always been the case informally but write it in the doc.

closes odoo/documentation#5835

X-original-commit: 80e1065dff
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
2023-09-13 04:37:08 +00:00
Xavier (XPL)
ea53f06197 [REF] install: move intro to main install page and split by install type
This PR moves the introduction about the different installation methods and editions found on the
install/install.rst page directly under the main install/ page. It creates three pages, one per
installation method documented on the install/install.rst page (Docker being documented on
docker.com and maintained by us), and moves the related content there. In addition, it fixes various
typos/grammar issues and improves the content according to the documentation guidelines. Various
references and links across the documentation had to be fixed accordingly.

task-3459070

closes odoo/documentation#5543

X-original-commit: 91c28fd433
Signed-off-by: Xavier Platteau (xpl) <xpl@odoo.com>
2023-08-19 07:58:45 +02:00
Christophe Monniez
899ee1c4c1 [FIX] deploy: reference the config parameter
The deploy documentation is assuming that `/etc/odoo.conf` is the
default config file, which is not the case.

With this commit, the configuration file references the cli
documentation.

closes odoo/documentation#4808

X-original-commit: 8aed7988ba
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-06-20 18:02:00 +02:00
tsm-odoo
5c89f63fb9 [FIX] deploy: duplicated proxy_set_headers in serve static block
This commit removes unnecessary `proxy_set_headers` in the serve
static config block.

Indeed, the request will either be served by Nginx in which case
the request won't go to the proxy backend or by the `@odoo` backend
which have its own `proxy_set_headers` set as the user is supposed
to copy/paste the contennt of the `location /` block.

closes odoo/documentation#3768

Closes: #3675
X-original-commit: 6129288439
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-03-08 11:37:16 +01:00
Julien Castiaux
a6fb221a75 [FIX] deploy: typo in example addons path
closes odoo/documentation#3748

Closes: #3675
X-original-commit: 01d9f7cdf1
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-03-07 02:56:59 +01:00
tsm-odoo
ffa10a9b0a [FIX] deploy: add set_headers, fixing wrong $host value
closes odoo/documentation#3636

X-original-commit: 8b92b734b2
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-02-20 12:39:32 +01:00
Jonathan Castillo (jcs)
65d71dd7be [FIX] *: RST cleanup
RST cleanup to comply with the RST guidelines. This is required so we
can use "make test", as there are currently hundreds of errors. For now,
it is unusable because of the oldest code in this repo.

closes odoo/documentation#3589

X-original-commit: 7ae76bad42
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-02-15 16:03:06 +01:00
Victor Feyens
c2f8d4bd44 [FIX] *: remove trailing whitespaces
Part-of: odoo/documentation#2984
2022-11-18 18:04:50 +01:00
Julien Castiaux
31aacc1791 [FIX] deploy.rst: nginx config for static files
In case of a source install the various places where static files can be
found are spread on the filesystem. The previous configuration sample
used custom internal locations but it turns out that it is only possible
to `try_files` on filesystem paths and on "named location (@ ones)".

This commit fixes the configuration sample so that it works for the
given situation where community and enterprise has been cloned from git.

task-3049538

closes odoo/documentation#2945

X-original-commit: 67cb3acd6a
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-11-18 12:57:55 +01:00
tsm-odoo
7423cfa8f8 [IMP] install: add $connection_upgrade map documentation
Before this commit, following the install documentation to setup
the odoochat server would fail. This was due to the fact that the
documentation about how to define the `$connection_upgrade` variable
was missing.

This PR fixes this issue.

closes odoo/documentation#2829

X-original-commit: 9ed3575f19
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2022-10-20 17:17:12 +02:00
Victor Feyens
9a5b5b0614 [FIX] *: Odoo 16 requires postgresql 12
Update the minimal version in the installation doc
Make all postgresql docs references target the v12 documentation
Fix some non http links on the way

closes odoo/documentation#2822

X-original-commit: 93b383e95d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-10-18 12:19:30 +02:00
tsm-odoo
6ec20abc53 [REF] deploy: adapt deployment documentation to websocket
closes odoo/documentation#2618

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-08-24 17:17:12 +02:00
Julien Castiaux
0f2b82cb37 [IMP] install/deploy: serve static file/attachment
Odoo is compatible with X-Sendfile (apache) and X-Accel (nginx). They
are web server extension that can be used by the web application (Odoo)
to delegate serving local files to the web server (apache/nginx). We use
those extension to stream attachments. The documentation now explains
what is X-Sendfile/X-Accel and how to configure each web server.

Along those changes, the few sentences about serving static files have
been reworded and now include various configuration examples.

closes odoo/documentation#2083

Task: 2801675
Related: odoo/odoo#88134
Related: odoo/enterprise#26191
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-01 02:53:55 +02:00
Eric Macharia
1aa28868e4 [FIX] install/maintain: typo in deploy.rst
closes odoo/documentation#1759

X-original-commit: 5c5ef6e603
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2022-03-29 03:31:24 +02:00
Obay Abdelgadir
cdf5c7eda4 [IMP] install: remove deprecated ssl instruction in deploy.rst
Backport of commit d227ab66b0 on #1448

closes odoo/documentation#1617

X-original-commit: a80f3c3899
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-22 13:44:14 +00:00
Antoine Vandevenne (anv)
17880034b4 [MERGE] Forward-port of branch 14.0 to master 2021-07-29 15:09:12 +02:00
Iago Alonso
098b5c5485 [FIX] administration/*/deploy: enforce consistent indentation in nginx config.
The indentation of the provided default nginx config wasn't consistent.
This commit enforces the indentation of two spaces for the nginx config.

Also cleans a bit the .rst useless empty lines.
2021-07-22 14:28:36 +02:00
Antoine Vandevenne (anv)
f8f784c0b0 [MERGE] Forward-port of branch 14.0 to master 2021-07-07 15:40:27 +02:00
Fabien Pinckaers
16418c020b [IMP] *: introduce tables of contents in top-level app pages 2021-07-07 14:56:38 +02:00