location /nextcloud { proxy_pass http://127.0.0.1:{{ apache_port }}/nextcloud; } location ~ /nextcloud/.*\.php$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://127.0.0.1:{{ apache_port }}; }