开发者

mod user_dir and wsgi

开发者 https://www.devze.com 2023-01-31 14:44 出处:网络
I am trying to setup a public_html/django_app folder, where all urls like ~/{username}/django would execute the .wsgi file located there.

I am trying to setup a public_html/django_app folder, where all urls like ~/{username}/django would execute the .wsgi file located there.

The idea is to checkout our project inside of the django folder, and have it work for everyone without further apache config.

Right now, our project is running in /var/www/project_name, but I would like every user to be able to checkout the project in their own folder /home/{username}/public_html/django_app, and I don't want them to edit any apache config.

So I guess the question is, what is the best way / location to do this in the apache configuration. I would like to avoid creating Virtu开发者_如何学PythonalHosts for everyone, just to change

WSGIScriptAlias django_app/ /home/{username}/django_app/core.wsgi

Thanks.


Answer:

WSGIScriptAliasMatch ^/~([^/]+)/django_app /home/$1/public_html/django_app/core.wsgi

0

精彩评论

暂无评论...
验证码 换一张
取 消