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 6674135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:42:36+00:00 2026-05-26T03:42:36+00:00

im setting a django server, but im having problem with my static’s file’s: django

  • 0

im setting a django server, but im having problem with my static’s file’s:

django settings

STATIC_URL = 'http://localproject/static/'
STATIC_ROOT = '/srv/www/project/static/'
MEDIA_ROOT = '/srv/www/project/public/'
MEDIA_URL = '/public/'
ADMIN_MEDIA_PREFIX = '/static/admin/'

apache

Alias /static/ /srv/www/project/static/'
<Document /srv/www/project/static>
Order allow,deny
Allow form all
</Document>

Alias /public/ /srv/www/project/public/'
<Document /srv/www/project/public>
Order allow,deny
Allow form all
</Document>

So, i have the admin without style and the website, for example http://localproject/public is showing a error about * Not FlatPage matches the given query *

yes, im using django.contrib.staticfiles

Any idea?
Thanks

  • 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-26T03:42:37+00:00Added an answer on May 26, 2026 at 3:42 am

    Im answering maybe that help someone, the problem was that im using apache (/etc/apache2/sites-available/project), but i was wrong with “use another apache config into the project” /srv/www/project/apache/httpd.conf and setting my Alias in this last one config, when the Alias config need to be in (/etc/apache2/sites-available/project)

    using:$ sudo nano /etc/apache2/sites-available/project
    

    and the content for project

    <VirtualHost *:80>
    
        ServerName project
        DocumentRoot /srv/www/project
    
        <Directory /srv/www/project>
            Order allow,deny
            Allow from all
        </Directory>
    
    
        AliasMatch ^/([^/]*\.css) /srv/www/project/static/css/$1
    
        Alias /public/ /srv/www/project/public/
        Alias /static/ /srv/www/project/productos/static/
    
        <Directory /srv/www/project/productos/static>
        Order deny,allow
        Allow from all
        </Directory>
    
        <Directory /srv/www/project/public>
        Order deny,allow
        Allow from all
        </Directory>
    
    
        WSGIDaemonProcess project processes=2 threads=15 display-name=%{GROUP}
        WSGIProcessGroup project
    
        WSGIScriptAlias / /srv/www/project/apache/django.wsgi
    
    </VirtualHost>
    

    my settings.py:

    MEDIA_ROOT = '/srv/www/project/public/'
    MEDIA_URL = 'http://project/public/'
    STATIC_ROOT = '/srv/www/project/productos/static/'
    STATIC_URL = '/static/'
    ADMIN_MEDIA_PREFIX = 'http://project/static/admin/'
    

    And now is working :), remember this is my own server

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

Sidebar

Related Questions

(r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT}), As you can see, I have a directory called media under
I'm new to django. so I need your help. I am having a problem,
I'd like to love Django, but this business of static and media files in
I am having issues setting up my wsgi file so I wanted to output
I'm looking into setting up Sentry for my Django project, but I was wondering
I get this error when setting up a server in Django. It is sqlite3
Django can simply connect to its own MySQL server by setting HOST and PORT
I am setting up DJango admin to make a model editable. On the same
Building a Django app on a VPS. I am not very experienced with setting
This is probably a setting error somewhere. I have a django app that works

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.