Skip to content
Merged
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: 6 additions & 8 deletions admin_manual/installation/nginx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Nginx configuration
===================

This page covers example Nginx configurations to use with running a Nextcloud
server. This page is community-maintained. (Thank you, contributors!)
server. These configurations examples were originally provided by
`@josh4trunks <https://github.com/josh4trunks>`_ and are community-maintained. (Thank you contributors!)

- You need to insert the following code into **your Nginx configuration file.**
- Adjust **server_name**, **root**, **ssl_certificate** and
Expand All @@ -22,9 +23,6 @@ server. This page is community-maintained. (Thank you, contributors!)
- Some environments might need a ``cgi.fix_pathinfo`` set to ``1`` in their
``php.ini``.

Thanks to `@josh4trunks <https://github.com/josh4trunks>`_ for providing /
creating these configuration examples.

Nextcloud in the webroot of nginx
---------------------------------

Expand Down Expand Up @@ -130,7 +128,7 @@ webroot of your nginx installation. In this example it is
deny all;
}

location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|ocm-provider\/.+)\.php(?:$|\/) {
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Expand All @@ -144,7 +142,7 @@ webroot of your nginx installation. In this example it is
fastcgi_request_buffering off;
}

location ~ ^\/(?:updater|ocs-provider|ocm-provider)(?:$|\/) {
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
Expand Down Expand Up @@ -291,7 +289,7 @@ your nginx installation.
deny all;
}

location ~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|ocm-provider\/.+)\.php(?:$|\/) {
location ~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Expand All @@ -305,7 +303,7 @@ your nginx installation.
fastcgi_request_buffering off;
}

location ~ ^\/nextcloud\/(?:updater|ocs-provider|ocm-provider)(?:$|\/) {
location ~ ^\/nextcloud\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
Expand Down