Configuring Apache with Django -



Configuring Apache with Django -

i'm trying configure apache django. working except admin panel. it's static files not loading. documentation talks different ways of doing none working me.

here 0000-default.conf:

<virtualhost *:80> # servername directive sets request scheme, hostname , port # server uses identify itself. used when creating # redirection urls. in context of virtual hosts, servername # specifies hostname must appear in request's host: header # match virtual host. default virtual host (this file) # value not decisive used lastly resort host regardless. # however, must set farther virtual host explicitly. #servername www.example.com serveradmin maahd@meddy.co documentroot /var/www/html <directory /> options followsymlinks allowoverride none </directory> <directory /var/www/html> options indexes followsymlinks multiviews allowoverride none order allow,deny allow </directory> scriptalias /cgi-bin/ /usr/lib/cgi-bin/ <directory "/usr/lib/cgi-bin"> allowoverride none options +execcgi -multiviews +symlinksifownermatch order allow,deny allow </directory> # available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # possible configure loglevel particular # modules, e.g. #loglevel info ssl:warn errorlog ${apache_log_dir}/error.log customlog ${apache_log_dir}/access.log combined alias /doc/ "/usr/share/doc/" <directory "/usr/share/doc/"> options indexes multiviews followsymlinks allowoverride none order deny,allow deny allow 127.0.0.0/255.0.0.0 ::1/128 </directory> alias /static /var/www/html/sp-django-master/meddy1/static # configuration files conf-available/, # enabled or disabled @ global level, possible # include line 1 particular virtual host. illustration # next line enables cgi configuration host # after has been globally disabled "a2disconf". #include conf-available/serve-cgi-bin.conf </virtualhost> include sites-available/meddy.co.conf # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

here meddy.co.conf meddy.co website:

<virtualhost *:80> servername ec2-54-254-141-40.ap-southeast-1.compute.amazonaws.com serveralias www.ec2-54-254-141-40.ap-southeast-1.compute.amazonaws.com wsgiscriptalias / /var/www/html/sp-django-master/meddy.wsgi documentroot /var/www/html/sp-django-master #alias /static /var/www/html/sp-django-master/meddy1/static <location "/static/"> options -indexes </location> #aliasmatch ^/([^/]*\.css) /var/www/html/sp-django-master/meddy1/static/meddy1/css/$1 aliasmatch ^/([^/meddy1]*\.css) /var/www/html/sp-django-master/meddy1/static/meddy1/css/$1 aliasmatch ^/([^/admin]*\.css) /var/www/html/sp-django-master/static/admin/css/$1 alias /static/ /var/www/html/sp-django-master/meddy1/static/ <directory /var/www/html/sp-django-master/meddy1/static> require granted </directory> <directory /var/www/html/sp-django-master/mysite> <files wsgi.py> require granted </files> </directory> alias /media/ /var/www/html/sp-django-master/uploads/ <directory /var/www/html/sp-django-master/uploads> require granted </directory> alias /static/admin/ /var/www/html/sp-django-master/static/admin/ </virtualhost>

any help appreciated.

django apache django-admin mod-wsgi apache-config

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -