Code Monkey home page Code Monkey logo

webproject's Issues

Handler "Python FastCGI" has a bad module "FastCgiModule" in its module list

I am trying to follow along the tutorial to run a Django app with IIS server. Here are my settings:
Windows Server 2019, IIS10.

I am setting up my server and added CGI as shown in the image.

Capture1

But, when i deploy the app, i get an error saying that the "FastCgiModule" is not in the list.

Capture2

I looked in HandlerMappings to find that the FastCgiModule was indeed not in the list of modules that IIS considers.

Help and understanding about this is much appreciated.

Internal Server Error - python 3.9 apache 2.4 based on Windows 10

Hi @Johnnyboycurtis
i followed step by step your youtube tutorial but when i start the Apache service and then go via browser to my localhost the page gives me an Internal Server Error. In the Apache log there are 2 particular lines:

[Thu Apr 21 16:56:18.626780 2022] [wsgi:error] [pid 6632:tid 1124] [client ::1:50605] mod_wsgi (pid=6632): Failed to exec Python script file 'C:/project/project/wsgi.py'.
[Thu Apr 21 16:56:18.626780 2022] [wsgi:error] [pid 6632:tid 1124] [client ::1:50605] mod_wsgi (pid=6632): Exception occurred processing WSGI script 'C:/project/project/wsgi.py'.

Any advice?
Thanks!

Should delete those FastCGI steps for IIS and recommend HttpPlatformHandler

Microsoft has deprecated wfastcgi so it shouldn't be used any more.

If people start cleanly with HttpPlatformHandler, the experience should be smooth,

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
        </handlers>
        <httpPlatform stdoutLogEnabled="true" stdoutLogFile=".\python.log" startupTimeLimit="20" processPath="C:\Users\<user name>\AppData\Local\Programs\Python\Python310\python.exe" arguments=".\mysite\manage.py runserver %HTTP_PLATFORM_PORT%">
        </httpPlatform>
    </system.webServer>
</configuration>

Python/Django still takes care of everything including static files, and IIS/HttpPlatformHandler just passes requests on.

More details can be found from my blog post.

help

1-after I deploy my Django project in folder wwwroot could I delete it to prevent customer who buy it from me to reuse it or copy to another

2-could I make a pc or own dedicated computer encrypt folder and act as a local server for many connected pc in a company run by linux?

3-what about statics my project much static and java script will be static root how it works?

Could contact you email?

4- I deployed one project. www.cutisystem.com on DigitalOcean on domain work http but if I put https it naginex error
I use cerbot certificate

The FastCGI process exited unexpectedly

I tried the tutorial with exactly the same steps but I still keep getting this error with fastcgi

HTTP Error 500.0 - Internal Server Error
c:\python37\python.exe - The FastCGI process exited unexpectedly

Most likely causes:
•IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
•IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
•IIS was not able to process configuration for the Web site or application.
•The authenticated user does not have permission to use this DLL.
•The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.

Things you can try:
•Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
•Check the event logs to see if any additional information was logged.
•Verify the permissions for the DLL.
•Install the .NET Extensibility feature if the request is mapped to a managed handler.
•Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.

Module : FastCgiModule
Notification: ExecuteRequestHandler
Handler: Python FastCGI
Error Code: 0xc0000409
Requested URL: http://localhost:80/
Physical Path: C:\inetpub\wwwroot
Logon method: Anonymous
Logon User: Anonymous

More Information:
This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.
View more information »

Microsoft Knowledge Base Articles:
•294807

My system information is as follows:
Windows Server 2016
Python 3.7.7

Python packages:
asgiref 3.2.10
Django 3.0.7
et-xmlfile 1.0.1
jdcal 1.4.1
openpyxl 3.0.3
pip 19.2.3
pytz 2020.1
setuptools 41.2.0
sqlparse 0.3.1
wfastcgi 3.0.0

Static Files are Not Served Properly by IIS Even After Following Step 8 of the README (Creating a Virtual Directory for Static Files)

Environment
OS: Windows 10 Enterprise Evaluation (VM)
Build: 17763.rs5_release.180914-1434

Replicate

  1. Follow exactly as the README instructs.
  2. Navigate to the admin portal of your newly deployed Django app.
  3. You will notice some CSS and images not loading properly.

Possible Solution
I couldn't get static file configuration in settings.py to be respected by IIS, however, I was able to get IIS to serve static files directly via its own configuration.

  1. After following Step 8 of the README, click on the newly created "static" directory on the left column.
  2. Then double click the Handler Mappings icon.
  3. Then click on the "View Ordered List..." on the right column.
  4. Then click on "StaticFile" which is given least priority, and bump it up via "Move Up" on the right-column until it is top priority.
  5. Now navigate to your Django app and static files should be served properly.

502 Bad gateway

I have used your web project application and followed the steps using nginx , but am getting 502 bad gateway message.
Then i checked the logs in nginx folder and it showed "No connection could be made because the target machine actively refused it".

Please help me to resolve the issue

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding

Hi @Johnnyboycurtis,

Was able to create a working Django application and works fine in development (runserver). However, I'm currently stuck with my production build using Apache as the web server. Unfortunately, I am not able to resolve the issue.

Was able to install the Apache service successfully. However, after adding the Python-related parameters, the service stopped and doesn't want to start/restart. Attached is my httpd.conf and the Apache error log file.

Would it be possible for you to check and share your recommendations on how I can correct this problem?

Thanks a lot for the assistance.

httpd - Copy.txt
error - Copy.txt

CSRF verification failed. Request aborted.

I used waitress with nginx everything works okay, but when I login to the app i got error CSRF verification failed. Request aborted.

site available configurations

# mysite_nginx.conf

server {
    # the port your site will be served on
    listen      82;
    server_name 172.30.1.196;
    charset     utf-8;

    # max upload size
    client_max_body_size 75M;   # adjust to taste
	
	location = /favicon.ico {
		alias C:/Apache24/htdocs/fuel/assets/favicon.ico;
		expires 7d; 
	}
	
	location = robots.txt {
		alias C:/Apache24/htdocs/fuel/frontend/templates/frontend/robortx.txt;
		expires 7d;
	}
    # Django media
    location /media  {
        alias C:/Apache24/htdocs/fuel/media;  # your Django project's media files - amend as required
    }
    # Django static
    location /static {
        alias C:/Apache24/htdocs/fuel/assets; # your Django project's static files - amend as required
        expires 7d; 
    }

    # Finally, send all non-media requests to the Django server.
    location / {
        proxy_pass http://127.0.0.1:92; # See output from runserver.py
		proxy_set_header Host $host; # send host header to django
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # send client ip to django
        proxy_set_header X-Forwarded-Proto $scheme; # send protocal to django
        #proxy_redirect http://127.0.0.1:91
		
    }
}

deploye multiple Django application on iis

Hello @Johnnyboycurtis I'm trying to host multiple django application on IIS but it's not working.
I saw your video it is very help full, but when I'm trying to host 2nd application on different port in different directory but not working.

I have created separate web.config file for 2nd application, but not running . giving below 500 error.

I also set permission to my application as you mention in your video

It would be great if help me in this I'm trying it from last 3 days but not works.

Please find below attachment of error
CbIqp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.