Django and SSL question

前端 未结 3 439
闹比i
闹比i 2020-12-07 19:33

I am planning to sell products by charging credit cards thus using SSL will be critical for Django-powered website. And I am very naive for this.

My initial django s

3条回答
  •  不思量自难忘°
    2020-12-07 20:05

    I have deployed Django apps on SSL using Apache's mod_ssl and mod_wsgi.

    I am no Apache expert, but here's how I setup SSL for one site (put the directives below in the httpd.conf file, or in a file referenced from that file, for instance in the sites-enabled directory, if that is used in your Apache installation). See the first documentation link below for how to create and use a self-signed certificate.

    NameVirtualHost *:443
    
        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/certificatefile.crt
        SSLCertificateKeyFile /etc/apache2/ssl/certificatekeyfile.crt
    
        WSGIScriptAlias / /path/to/file.wsgi
    
    

    Documentation links:

    • Apache self signed certificate HOWTO: http://www.perturb.org/display/entry/754/
    • http://httpd.apache.org/docs/2.2/mod/mod_ssl.html
    • http://httpd.apache.org/docs/2.2/ssl/
    • Using mod_wsgi to host Django: http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/

提交回复
热议问题