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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:53:39+00:00 2026-06-07T16:53:39+00:00

https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/ details some setup for FCGI, but while it has material for the Apache

  • 0

https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/ details some setup for FCGI, but while it has material for the Apache config file, it omits the FCGI.

How can I create a site.fcgi file for a daemonized fastcgi process that is running on the same server bound to 127.0.0.1, and listening on port 1234?

–EDIT–

I have the following in my httpd.conf:

FastCGIExternalServer /home/jonathan/store/deploy/store.fcgi -host 127.0.0.1:1234

<VirtualHost *:80>
    ServerName steampunk.stornge.com
    DocumentRoot /home/jonathan/store/
    Alias /media /home/jonathan/store/media
    RewriteEngine On
    RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
    RewriteCond %(REQUEST_FILENAME} !-f
    RewriteRule ^/(.*)$ /store.fcgi/$1 [QSA,L]
</VirtualHost>

In /home/jonathan/store/deploy/store.fcgi I have:

import os
import sys

from os.path import abspath, dirname, join
from site import addsitedir

sys.path.insert(0, abspath(join(dirname(__file__), "../")))

from django.conf import settings
os.environ["DJANGO_SETTINGS_MODULE"] = "store.settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="true")

And I also have, running,

python manage.py runfcgi method=threaded host=127.0.0.1 port=1234

When I pull up http://[hostname], I get:

Not Found

The requested URL / was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.22 (Ubuntu) Server at [hostname] Port 80

http://[hostname]/media pulls up a populated index.

What could be improved, or might be causing trouble, in this use of FCGI? store.cgi was based on a couple of .fcgi files lying around which I used after not finding model FCGI files for Satchmo in the Django or FCGI docs. I don’t trust it that far; I just haven’t Googled something better.

Any suggestions?

  • 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-07T16:53:41+00:00Added an answer on June 7, 2026 at 4:53 pm

    I’ve succeeded at deploying it with another option, FCGI:

    In sites-enabled:

    FastCGIExternalServer /home/jonathan/testfcgi/testfcgi.fcgi -host 127.0.0.1:3033
    
    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName testfcgi.jonathanscorner.com
        DocumentRoot /home/jonathan/testfcgi
        Alias /media /home/testfcgi/media
        RewriteEngine On
        RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^/(.*)$ /testfcgi.fcgi/$1 [QSA,L]
    
        <Directory /home/jonathan/testfcgi/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
        </Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    

    This is combined with a command line invocation of fcgi.

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

Sidebar

Related Questions

I looked http://docs.djangoproject.com/en/dev/howto/static-files/ already, but am still confused on how to get css/image files
I am choosing between markup languages mentioned on https://docs.djangoproject.com/en/dev/ref/contrib/markup/ . But I need one
I am having problems setting up wgsi with django. I'm following this http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/ .
I've been following the django tutorial over at https://docs.djangoproject.com/en/dev/intro/tutorial03/ but I've hit a brick
I followed https://docs.djangoproject.com/en/dev/ref/contrib/flatpages/ and I created a flatpage using my own template in http://localhost:8000/about-me/
I try to use assignment_tag from django docs: https://docs.djangoproject.com/en/1.4/howto/custom-template-tags/#howto-custom-template-tags-simple-tags Test project: mysite/ manage.py polls/
Following this documentation ( https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views ), I am trying to create a custom error
I'm trying to write a custom inclusion_tag in django. Following the example on http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
I'm doing this Django tutorial https://docs.djangoproject.com/en/dev/intro/tutorial01/ and was_ published _today isn't working. Thanks for
I was going through this tutorial in order to learn how Django works: https://docs.djangoproject.com/en/dev/intro/tutorial01/

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.