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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:38:40+00:00 2026-06-09T19:38:40+00:00

Problem : all urls go to my landing page, including a basic ‘/about’ and

  • 0

Problem: all urls go to my landing page, including a basic ‘/about’ and ‘/contact’

Example: Url http://www.mydomain.com works perfectly (loads css, etc), but http://www.mydomain.com/about goes to http://www.mydomain.com even though it says http://www.mydomain.com/about in address bar.

Question: How do I configure nginx to simply pass everything through to django?

I’m deploying a website I’ve written locally using django to an EC2 instance. I am able to access my default landing page, but I can’t access any other page. I have a basic site with /about, /contact mappings, but when I go to them I simply am redirected to my landing page. I’m pretty sure that this has something to do with my nginx config, but after looking through basic nginx tutorials I don’t think I’m grasping what I’m missing.

Here is my conf file for nginx…

server {
  listen 80;
  server_name mydomain.com;
  access_log /var/log/nginx/sample_project.access.log;
  error_log /var/log/nginx/sample_project.error.log;

  # https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-in-production
  location /static/ { # STATIC_URL
      alias /home/ubuntu/path/to/static/; # STATIC_ROOT
      expires 30d;
  }

  location /media/ { # MEDIA_URL
      alias /home/ubuntu/path/to/static/; # MEDIA_ROOT
      expires 30d;
  }

  # I have also tried 'location ~* ^(.*?)$' and it had the same effect
  location / {
      include fastcgi_params;
      fastcgi_pass 127.0.0.1:8080;
  } 
}

As I read through nginx tutorials/etc, I can appreciate that it can do a lot, but I would prefer to handle all incoming urls through django.

  • 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-06-09T19:38:42+00:00Added an answer on June 9, 2026 at 7:38 pm

    I just ended up using this nginx conf file and it began to work fine. I think it was probably the addition of one of the arguments to the location element that did the trick.

    https://code.djangoproject.com/wiki/ServerArrangements

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

Sidebar

Related Questions

I'm using mod_rewrite to change all the URLs on a site. Example: http://www.site.com/about/ becomes
I need to repair all the URLs in a Wordpress site. The problem is
I have a website and am trying to rewrite all urls with 'http://www...' to
I'm having a problem where my web service expects all RESTful urls to include
I have this problem where all URLs like context/path/file/anything/that/follows becomes context/path/file.php/anything/that/follows or context/path/file.xml/anything/that/follows .
Good day everyone. I have been having the same problem all day at work
Problem Hello all! I have this code which takes my jpg image loops through
I had no problem at all running the following code on a local server,
I have no problem finding all tags for an object and getting the count
I have a (big) problem that all of you that work with Webforms might

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.