Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6896771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:05:09+00:00 2026-05-27T07:05:09+00:00

My css files are not working in Production server . Ive deployed using WSGI

  • 0

My css files are not working in Production server. Ive deployed using WSGI. Will you please fix my problem? Thank you
css link

<link href="{{ MEDIA_URL}}css/style.css" rel="stylesheet" type="text/css" />

settings.py

CURRENT_PATH = '/home/nibbler/code/project/
MEDIA_ROOT = os.path.join(CURRENT_PATH, 'templates/media')

MEDIA_URL = '/media/'
TEMPLATE_DIRS = (
    os.path.join(CURRENT_PATH, 'templates/temp_name'),
)

site-available\default

<VirtualHost *:80>
    ServerAdmin me@me.com
    ServerName project.org
    DocumentRoot "/home/nibbler/code/project/"
    ServerName localhost
    ErrorLog "/home/nibbler/code/project/logs/apache-error.log"
    CustomLog "/home/nibbler/code/project/logs/apache-access.log" common

    Options ExecCGI FollowSymLinks MultiViews

    AddHandler wsgi-script .wsgi
    WSGIDaemonProcess nibbler
    WSGIProcessGroup nibbler

    Alias /media /home/nibbler/code/project/templates/media/
    WSGIScriptAlias / /home/nibbler/code/project/apache/django.wsgi

    DirectoryIndex index.html index.cgi

    AddHandler cgi-script .cgi .pl
</VirtualHost>

urls.py

if settings.DEBUG:
    # static files (images, css, javascript, etc.)
    urlpatterns += patterns('',
        (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': settings.MEDIA_ROOT}))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:05:10+00:00Added an answer on May 27, 2026 at 7:05 am

    You have:

    Alias /media /home/nibbler/code/project/templates/media/
    

    wrong for a start. Try:

    Alias /media/ /home/nibbler/code/project/templates/media/
    

    They must either both have trailing slash or neither have it. You can’t have one have it and the other one not have it.

    BTW, having:

    DocumentRoot "/home/nibbler/code/project/"
    

    is a bad idea. Don’t set DocumentRoot to be where your code is. If you were to remove WSGISriptAlias for some reason, all your code would be downloadable by external people.

    You are also missing a Directory block with Allow directive in it for where WSGI script files and static files are present. This implies you have outside of this virtual host changed Apache config in some way to say that Apache can serve up files from any directory on your box, which is a bad idea as it strips away one level of security.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SASS is not creating the CSS files, but HAML is working just fine. I
I'm trying to minify multiple CSS files using preg_replace() . Actually, I'm only trying
I have a problem applying css to the web pages, using spring security (3.0.7
I'm currently working on a Drupal site (6.*), which when in production mode will
I am unsure why my CSS is not working here. What am I missing?
Are .css files always needed? Or may I have a .css basic file and
Normally css files are put inside <head></head> , what if I put it inside
If I have two css files: File 1: .colorme { background-color:Red; } File 2:
So I have about 10 short css files that I use with mvc app.
Is there any native compression (for javascript/css files) available in ASP.NET?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.