[PYTHON] Two things I was addicted to building Django + Apache + Nginx on Windows

Overview

In this article, I will share the following two points that I was addicted to when building the title environment on windows.

--Mod_wsgi filename, location, extension --How to describe the file path where the static file is stored

Each version

mod_wsgi filename, extension, location

I tried to install mod_wsgi with pip, referring to article by h_nt21. In the above article, after installation /Python35/mod_wsgi.so Was written to be made. However, no such file was created. actually, /Python35/lib/site-packages/mod_wsgi/server/mod_wsgi.cp35-win_amd64.pyd File was created. This could be treated as the same as the above file.

How to describe the file path where the static file is stored

This is because I didn't know the style of windows. In nginx, when sending to a static file wrapped outside, I wrote as follows.

location \static\ {
  alias "Drive:¥pass¥to¥static¥";
}

Correctly,

location \static\ {
  alias "Drive:/pass¥to/static/";
}

is.

I copied the location of the static file as a path and pasted it, and it became the above. To be correct, it was necessary to separate the paths with / as in the normal (unix etc.) file system instead of \ (backslash) as shown below.

As an aside, STATIC_ROOT in Django's settings.py could be a normal . So I was addicted to it

Recommended Posts

Two things I was addicted to building Django + Apache + Nginx on Windows
I was addicted to Flask on dotCloud
I was addicted to multiprocessing + psycopg2
The record I was addicted to when putting MeCab on Heroku
A note I was addicted to when making a beep on Linux
Django + Apache with mod_wsgi on Windows Server 2016
I was addicted to pip install mysqlclient
What I was addicted to Python autorun
I was addicted to running tensorflow on GPU with NVIDIA driver 440 + CUDA 10.2
A story I was addicted to trying to install LightFM on Amazon Linux
I was addicted to not being able to use Markdown on pypi's long_description
What I was addicted to when creating a web application in a windows environment
Run django applications on Windows + Apache + mod_wsgi + services.
[Introduction to json] No, I was addicted to it. .. .. ♬
Three things I was addicted to when using Python and MySQL with Docker
Summary of points I was addicted to running Selenium on AWS Lambda (python)
I want to do pyenv + pipenv on Windows
Two things I was happy about with Python 3.9
How to embed mod_wsgi into Apache on Python Windows
Apache + Django + Shibboleth on Windows Server 2016 Related Articles Summary
I was addicted to scraping with Selenium (+ Python) in 2020
A story that I was addicted to at np.where
How to run Django on IIS on a Windows server
I was addicted to trying logging.getLogger in Flask 1.1.x
What I was addicted to when using Python tornado
Memo (March 2020) that I was addicted to when installing Arch Linux on MacBook Air 11'Early 2015
What I was addicted to when migrating Processing users to Python
I tried changing the python script from 2.7.11 to 3.6.0 on windows10
[Fixed] I was addicted to alphanumeric judgment of Python strings
I was a little addicted to installing Python3.3 + mod_wsgi3.4 on Sakura VPS (CentOS), so a retrospective memo
When I put Django in my home directory, I was addicted to static files with permission errors
Django environment development on Windows 10
I ran python on windows
A story that I was addicted to calling Lambda from AWS Lambda.
What I was addicted to when introducing ALE to Vim for Python
What I was addicted to with json.dumps in Python base64 encoding
Note that I was addicted to sklearn's missing value interpolation (Imputer)
A note I was addicted to when creating a table with SQLAlchemy
I was addicted to confusing class variables and instance variables in Python
Everything from building a Python environment to running it on Windows