如何设置apache2与django一起使用?

时间:2015-11-22 20:19:04

标签: python django apache apache2 python-3.4

我希望在我的本地计算机上访问leo.loc上的django站点。 但我所做的一切都是徒劳的。

我正在使用 ubuntu 14.04,apache 2.4.6,python 3.4,django 1.8和virtualenv

我在文件/etc/apache2/sites-available/leo.conf中有以下内容:

<VirtualHost *:80>

ServerName leo.loc

<Directory "/home/siz/www/leo/leo/">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>


Alias /static /home/siz/www/leo/leo/static
<Directory /home/siz/www/leo/leo/static>
    Require all granted
</Directory>



<Directory /home/siz/www/leo/leo/leo>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>

WSGIDaemonProcess leo python-path=/home/siz/www/leo/leo:/home/siz/www/leo/leo_env/lib/python3.4/site-packages
WSGIProcessGroup leo
WSGIScriptAlias / /home/siz/www/leo/leo/leo/wsgi.py



</VirtualHost>

0 个答案:

没有答案