Its set up for multiple vhosts, and I noticed I either have to explicity
alias each folder I need served or i could use the project folder to allow
the whole app but wouldnt that create security holes? Actually I think I
tried alias static with the project folder and it didnt work. And for
production apache prob isnt the best for serving static files as well as
being the server, so Ill look into nginx but for now will use apache for
local dev.
<VirtualHost *:80>
ServerName dsite1.me
WSGIDaemonProcess dsite1 python-home=/var/www/dtuts/venv
python-path=/var/www/dtuts/dsite1
WSGIProcessGroup dsite1
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /var/www/dtuts/dsite1/dsite1/wsgi.py
<Directory /var/www/dtuts/dsite1/dsite1/>
<Files wsgi.py>
Order allow,deny
Allow from all
</Files>
</Directory>
Alias /static /var/www/dtuts/dsite1/bloghome/static
<Directory /var/www/dtuts/dsite1/bloghome/static>
Order allow,deny
Allow from all
</Directory>
#Alias /robots.txt /var/www/dtuts/dsite1/static/robots.txt
#Alias /favicon.ico /var/www/dtuts/dsite1/static/favicon.ico
#Alias /media /var/www/dtuts/dsite1/media
#<Directory /var/www/dtuts/dsite1/media>
# Order allow,deny
# Allow from all
#</Directory>
ErrorLog /var/www/dtuts/logs/error.log
LogLevel warn
CustomLog /var/www/dtuts/logs/access.log combined
</VirtualHost>
On Wednesday, September 28, 2016 at 5:48:46 PM UTC-7, Graham Dumpleton
wrote:
>
>
> On 28 Sep 2016, at 7:31 PM, Jalapene Burro <[email protected]
> <javascript:>> wrote:
>
> hey, using django,
>
> wondering, since its uses subapps, using apache for serving static files
> for local development, jsut curious how can i allow all apps to serve
> without having to add an extra entry for each one like so.
>
> Alias /static /var/www/dtuts/dsite1/bloghome/static
> <Directory /var/www/dtuts/dsite1/bloghome/static>
> Order allow,deny
> Allow from all
> </Directory>
>
>
> Bit confused by your question. What is the rest of the mod_wsgi
> configuration? Are you saying you only have one Django site configured in
> mod_wsgi, or do you have more than one? If more than one, is each in its
> own VirtualHost?
>
> BTW, for local development, you may be better off using mod_wsgi-express.
>
> https://pypi.python.org/pypi/mod_wsgi
>
> You can run it from the command line when you need it just like with
> Django development server, but means using real web server. You can still
> enable things like source code reloading if need be.
>
> Graham
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.