开发者

django hosting error , about alwaysdata.com

开发者 https://www.devze.com 2023-01-30 16:12 出处:网络
this ismy alwaysdata page - http://zjm.alwaysdata.net/: It is not configured successful ,but when i Visit the http://zjm.alwaysdata.net/mysite/public/

this is my alwaysdata page - http://zjm.alwaysdata.net/:

django hosting error , about alwaysdata.com

It is not configured successful ,but when i Visit the http://zjm.alwaysdata.net/mysite/public/

it show my main page :

django hosting error , about alwaysdata.com

so what can i do to show my main-page on the http://zjm.alwaysdata.net/

thanks

updated

this is my django.fcgi :

#!/usr/bin/python
import os, sys

_PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, _PROJECT_DIR)
sys.path.insert(0, os.path.dirname(_PROJECT_DIR))

_PROJECT_NAME = _PROJECT_DIR.split('/')[-1]
os.environ['DJANGO_SETTINGS_MODULE'] = "%s.settings" % _PROJECT_NAME

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

and .htaccess :

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

this is my urls.py:

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
from views import *

urlpatterns = patterns('',
    # Example:
    #(r'^$', homepage),
    # (r'^mysite/', include('mysite.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls'))开发者_开发问答,

    # Uncomment the next line to enable the admin:
    # (r'^admin/', include(admin.site.urls)),
)


You should configure your domain (zjm.alwaysdata.net) to point to your /public directory on the server : /home/zjm/www/mysite/public/

0

精彩评论

暂无评论...
验证码 换一张
取 消