Last active
May 22, 2021 14:55
-
-
Save paulpanezc/a44d58222664195fb40f075103541ac3 to your computer and use it in GitHub Desktop.
Deploying Django with Apache in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule wsgi_module modules/mod_wsgi.so | |
WSGIPythonHome "ruta_absoluta_entorno_virtual\\" | |
WSGIPythonPath "ruta_absoluta_apache\\htdocs\\mi_proyecto\\" | |
<VirtualHost *:*> | |
WSGIScriptAlias / "ruta_absoluta_apache\\htdocs\\mi_proyecto\\mi_proyecto\\wsgi.py" | |
Alias /static/ "ruta_absoluta_apache\\htdocs\\mi_proyecto\\deploy\\static\\" | |
Alias /media/ "ruta_absoluta_apache\\htdocs\\mi_proyecto\\deploy\\media\\" | |
<Directory "ruta_absoluta_apache\\htdocs\\mi_proyecto\\mi_proyecto\\" > | |
<Files wsgi.py> | |
Require all granted | |
</Files> | |
</Directory> | |
<Directory "ruta_absoluta_apache\\htdocs\\mi_proyecto\\deploy\\static\\" > | |
Require all granted | |
</Directory> | |
<Directory "ruta_absoluta_apache\\htdocs\\mi_proyecto\\deploy\\media\\" > | |
Require all granted | |
</Directory> | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG = False | |
STATICFILES_DIRS = ( | |
os.path.join(BASE_DIR, 'static'), | |
) | |
STATIC_ROOT = os.path.join(BASE_DIR, 'deploy/static') | |
STATIC_URL = 'http:/localhost/static/' | |
MEDIA_ROOT = os.path.join(BASE_DIR, 'deploy/media') | |
MEDIA_URL = 'http:/localhost/media/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment