How do you Require Login for Media Files in Django

It seems to me that the method you outlined in your code should work. It’s really no different than any other protected resource: your views can serve files from disks, records from databases, rendered templates or anything. Just as the login_required decorator prevents unauthorized access to other views, it will prevent such access to your … Read more

Apache warns that my self-signed certificate is a CA certificate

Short way (e.g. with OpenSSL 1.1.0f and Apache 2.4.37): openssl genrsa -out notEncodedPk.key 3072 openssl req -new -out website.csr -sha256 -key notEncodedPk.key openssl x509 -req -in website.csr -days 365 -signkey notEncodedPk.key -out website.cert -outform PEM genrsa generates a 3072 bit RSA-Key. (The system should be online for some time to have good data in /dev/(u)random … Read more

Generating CSR for multi-domain [closed]

For an X.509 certificate to support multiple domains, it must use multiple Subject Alternative Name DNS entries, according to RFC 2818 (HTTP over TLS) (or RFC 6125): If a subjectAltName extension of type dNSName is present, that MUST be used as the identity. Otherwise, the (most specific) Common Name field in the Subject field of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)