19-07-2020
-python 3.8 -htpasswd -modules Powershell
This commit is contained in:
@@ -46,6 +46,48 @@ $ python3 -m site --user-base
|
||||
|
||||
|
||||
|
||||
### Passage de Python 3.7 à 3.8:
|
||||
|
||||
Erreur avec pip3:
|
||||
|
||||
```bash
|
||||
$ pip3 list --outdated --format columns
|
||||
zsh: /usr/local/bin/pip3: bad interpreter: /usr/local/opt/python/bin/python3.7: no such file or directory
|
||||
```
|
||||
|
||||
```bash
|
||||
$ pip3 -V
|
||||
zsh: /usr/local/bin/pip3: bad interpreter: /usr/local/opt/python/bin/python3.7: no such file or directory
|
||||
pip 19.0.3 from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
|
||||
```
|
||||
|
||||
Il faut donc mettre à jour pip3:
|
||||
|
||||
```bash
|
||||
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
% Total % Received % Xferd Average Speed Time Time Time Current
|
||||
Dload Upload Total Spent Left Speed
|
||||
100 1825k 100 1825k 0 0 2692k 0 --:--:-- --:--:-- --:--:-- 2688k
|
||||
|
||||
$ python3 get-pip.py
|
||||
Collecting pip
|
||||
Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
|
||||
Installing collected packages: pip
|
||||
Attempting uninstall: pip
|
||||
Found existing installation: pip 20.0.2
|
||||
Uninstalling pip-20.0.2:
|
||||
Successfully uninstalled pip-20.0.2
|
||||
Successfully installed pip-20.1.1
|
||||
```
|
||||
|
||||
```bash
|
||||
$ pip3 -V
|
||||
|
||||
pip 20.1.1 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### idle:
|
||||
|
||||
**idle** est l'éditeur par défaut de Python
|
||||
|
||||
@@ -385,6 +385,14 @@ $ sudo apachectl stop
|
||||
$ sudo apachectl start
|
||||
```
|
||||
|
||||
Pour connaître la configuration dans httpd.conf, lancez `mod_wsgi-express module-config`
|
||||
|
||||
```bash
|
||||
$ mod_wsgi-express module-config
|
||||
LoadModule wsgi_module "/usr/local/lib/python3.8/site-packages/mod_wsgi/server/mod_wsgi-py38.cpython-38-darwin.so"
|
||||
WSGIPythonHome "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8"
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Liens:
|
||||
|
||||
36
docs/macos/webserver/htpasswd.md
Normal file
36
docs/macos/webserver/htpasswd.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Protéger l'accès à une page par un mot-de-passe
|
||||
|
||||
|
||||
|
||||
https://www.it-connect.fr/securiser-les-authentifications-htaccess-avec-loption-digest%EF%BB%BF/
|
||||
|
||||
|
||||
|
||||
On utilise 2 fichiers (.htaccess et .htpasswd):
|
||||
|
||||
### .htaccess
|
||||
|
||||
Il est à placer dans le dossier à protéger.
|
||||
https://httpd.apache.org/docs/current/fr/howto/htaccess.html
|
||||
chmod 755
|
||||
|
||||
```http
|
||||
AuthType Basic
|
||||
AuthName "Protected Site"
|
||||
AuthUserFile /Users/bruno/Sites/.htpasswd
|
||||
require valid-user
|
||||
```
|
||||
|
||||
|
||||
|
||||
### .htpasswd
|
||||
|
||||
On peut le placer n'importe où.
|
||||
|
||||
Il contient les paires d'identifiants / mots de passe
|
||||
|
||||
```http
|
||||
bruno:$2y$10$eoOcCeh6lKR.yLc7B44bD.9AAGI90XyYaXZrSbzdswKuL6Q5E9oX2
|
||||
```
|
||||
|
||||
http://www.htaccesstools.com/htpasswd-generator
|
||||
@@ -16,3 +16,5 @@
|
||||
|
||||
[Xhprof](Xhprof.md)
|
||||
|
||||
[Protéger l'accès à une page](htpasswd.md)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user