Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- root /var/www/nextcloud/;
- server_name nextcloud.mydomainname.com;
- access_log /home/nextcloud/nginx/logs/nginx.access.log;
- error_log /home/nextcloud/nginx/logs/nginx.error.log;
- index index.php index.html index.htm;
- location / {
- rewrite ^ /index.php$uri;
- }
- location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
- return 404;
- }
- location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
- return 404;
- }
- location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # Ubuntu 17.04
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_intercept_errors on;
- fastcgi_request_buffering off;
- }
- location ~ ^/(?:updater|ocs-provider)(?:$|/) {
- try_files $uri $uri/ =404;
- index index.php;
- }
- location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
- try_files $uri /index.php$uri$is_args$args;
- access_log off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement