【问题标题】:deploying django, error : /mysite.fcgi/ was not found on this server, in shared hosting部署 django,错误:/mysite.fcgi/ 在此服务器上找不到,在共享主机中
【发布时间】:2014-08-18 05:58:57
【问题描述】:

/home/public_html/.htaccess

.htaccess

AddHandler fastcgi-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /mysite.fcgi/$1 [QSA,L]

mysite.fcgi 路径:/home/public_html/mysite.fcgi

我将权限更改为 755(mysite.fcgi)

执行后

未找到

在此服务器上找不到请求的 URL /mysite.fcgi/。

此外,在尝试使用 ErrorDocument 处理请求时遇到 404 Not Found 错误。

【问题讨论】:

标签: django apache .htaccess shared-hosting


【解决方案1】:
AddHandler fastcgi-script .fcgi

<IfModule mod_fcgid.c>
    AddHandler fcgid-script .fcgi
    <Files ~ (\.fcgi)>
        SetHandler fcgid-script
        Options +FollowSymLinks +ExecCGI
    </Files>
</IfModule>

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /mysite.fcgi/$1 [QSA,L]

这对我有用

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-19
    • 2018-06-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-10
    • 2016-04-10
    相关资源
    最近更新 更多