1
SSL Django的應用程序我已經安裝在ubuntu lucid
apache2
,並啓用ssl
。現在我正在運行的應用程序django
(可以說myapp1
)它使用mod_wsgi
上。 我已經配置了/etc/apache2/sites_enabled/ssl
文件和/etc/apache2/sites-available/ssl
如下。運行兩個在同一個Apache服務器
現在,我可以使用url
https://127.0.0.1/myapp1
我需要在同一臺服務器上運行的另一個Django應用程序(比如myapp2
)運行我的應用程序,並且還使用了SSL.So,我應該如何配置呢?有人能幫幫我嗎?
<VirtualHost *:443>
ServerAdmin [email protected]
DocumentRoot /home/me/dev/python/django/myapp1
SSLEngine on
SSLOptions +StrictRequire
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
WSGIScriptAlias /myapp1 /home/me/dev/python/django/myapp1/myapp1.wsgi
Alias /site_media/ /home/me/dev/python/django/myapp1/media/
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>