LoginSignup
2
5

More than 5 years have passed since last update.

(メモ)Vagrant環境でDjango

Last updated at Posted at 2014-02-28

mod_wsgi なるものが橋渡ししてくれるようなのでインストール(他にも方法はあるっぽいが今回はこれで)

sudo yum install mod_wsgi

あとはここを参考にして進めていく。
/etc/httpd/conf.d 下に拡張子が .conf の新規ファイルを書き( /etc/httpd/conf/httpd.conf のサブ的な扱いなのだろうか?)、指定した箇所に動作用の .wsgi スクリプトを書く。

なお、参考ページでは cgi-bin の下にDjangoプロジェクトを置いているようだが、別にどこでもいい模様(もちろんその場合は該当の.confのディレクトリ部分を書き換える)。

それらができたら以下で再起動。

sudo service httpd restart

WSGIScriptAlias の第二引数で指定したURL(他とカブっていると多分InternalServerError)にアクセスするとページが表示される

2
5
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
5