Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank contact page #4193

Open
cr4shydlo opened this issue Oct 22, 2024 · 3 comments
Open

Blank contact page #4193

cr4shydlo opened this issue Oct 22, 2024 · 3 comments

Comments

@cr4shydlo
Copy link

Hello. I try tu run contact app in nextcloud. But when i try to open contact page i get blank page (nextcloud menu still works) but i dont see anything. Any add contact button etc...

Nextcloud Hub 9 (30.0.1)
Contact Version : Version 6.1.0, AGPL-licensed

I use NGINX + PHP_FPM 8.3

If anyone can help, will be gratefull.

Best.

@jkuettner
Copy link

jkuettner commented Oct 30, 2024

I ran into the same problem. A Nextcloud system check and a web search showed that I need to update my Nginx server configuration since one of the recent updates:

old:

    location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite)$ {
        try_files $uri /index.php$request_uri;
        expires 6M;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets

        location ~ \.wasm$ {
            default_type application/wasm;
        }
    }

new:

    location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite|mjs)$ {
        try_files $uri /index.php$request_uri;
        expires 6M;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets

        location ~ \.wasm$ {
            default_type application/wasm;
        }

        location ~ \.mjs$ {
            default_type text/javascript;
        }
    }

src: nextcloud/server#42989 (comment)

Hope this helps.

@danhead
Copy link

danhead commented Nov 17, 2024

@jkuettner Thanks! This solved the problem for me.

@FelixSchwarz
Copy link

FelixSchwarz commented Nov 30, 2024

Thank you, that helped me as well (the mjs extension was missing in my case).

Just ftr: The NextCloud docs also mention some other file extensions in the location block
https://docs.nextcloud.com/server/stable/admin_manual/installation/nginx.html

    # Serve static files
    location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
        try_files $uri /index.php$request_uri;
        # HTTP response headers borrowed from Nextcloud `.htaccess`
        add_header Cache-Control                     "public, max-age=15778463$asset_immutable";
        add_header Referrer-Policy                   "no-referrer"       always;
        add_header X-Content-Type-Options            "nosniff"           always;
        add_header X-Frame-Options                   "SAMEORIGIN"        always;
        add_header X-Permitted-Cross-Domain-Policies "none"              always;
        add_header X-Robots-Tag                      "noindex, nofollow" always;
        add_header X-XSS-Protection                  "1; mode=block"     always;
        access_log off;     # Optional: Don't log access to assets
    }

    location ~ \.(otf|woff2?)$ {
        try_files $uri /index.php$request_uri;
        expires 7d;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants