I'm on shared hosting with Dreamhost and I believe they're running
apache2 on debian/linux. I'm running python2.4 inside virtualenv with
passenger_wsgi. Sorry about the commented lines and from my server
logs I get this:
[Mon Sep 21 04:13:06 2009] [error] [client 66.249.68.7] Premature end
of script headers: robots.txt
[Mon Sep 21 04:13:07 2009] [error] [client 66.249.68.7] Premature end
of script headers: internal_error.html
I deleted robots.txt and I don't get any Traceback i.e., as soon as I
look up the domain with these settings I get the error. I've had no
problems locally starting the development server with the runserver
command. The contents of passenger_wsgi are as follows:
import sys, os
INTERP = "/home/username/local/bin/python2.4"
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
sys.path.append("/home/username/mysite.com")
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
On Sep 21, 7:21 pm, Bob Waycott <[email protected]> wrote:
> First off, set DEBUG = True ... this way you get standard Django error pages
> that tell you exactly what is going wrong, with a Traceback.
> Second, I'd suggest cleaning all the commented stuff out of your settings
> file. You don't need all those comments & it makes it a real pain to read
> through.
>
> If you get a Traceback, use pastebin or something and provide us a link.
> Then we can see what is happening.
>
> On Mon, Sep 21, 2009 at 9:56 PM, Chris Moffitt <[email protected]> wrote:
> > What server configuration are you using and how are you trying to start the
> > django process?
>
> > You might want to look in your web server logs for more info too.
>
> > -Chris
>
> > On Mon, Sep 21, 2009 at 7:49 PM, neridaj <[email protected]> wrote:
>
> >> Hello,
>
> >> I've tested my store locally and everything seems to be working
> >> properly. I've been trying to deploy what I have and it seems like
> >> there's a problem with either settings or local_settings. I've created
> >> a project with django-admin.py and I get the default congratulations
> >> page so I know things are working, however, when I use the settings
> >> files for satchmo I get "500 Internal Server Error". The settings
> >> files that worked for me locally were taken from:
>
> >>http://www.saltycrane.com/blog/2008/12/card-store-project-3-installin...
>
> >> I've tried commenting things out and running pkill python to narrow
> >> down what it is but I haven't found anything. If anyone sees anything
> >> questionable in these settings files I would really appreciate some
> >> feedback.
>
> >> Thanks,
>
> >> Jason
>
> >> # SETTINGS.PY
>
> >> # Django settings for satchmo project.
> >> # If you have an existing project, then ensure that you modify
> >> local_settings-customize.py
> >> # and import it from your main settings file. (from local_settings
> >> import *)
> >> import os
>
> >> DIRNAME = os.path.abspath(os.path.dirname(__file__).decode('utf-8'))
>
> >> DJANGO_PROJECT = 'satchmo'
> >> DJANGO_SETTINGS_MODULE = 'satchmo_store.settings'
>
> >> LOCAL_DEV = False
> >> DEBUG = False
> >> TEMPLATE_DEBUG = DEBUG
>
> >> ADMINS = (
> >> ('username', '[email protected]'),
> >> )
>
> >> MANAGERS = ADMINS
>
> >> DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2',
> >> 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
> >> # The following variables should be configured in your
> >> local_settings.py file
> >> DATABASE_NAME = 'mysite_db' # Or path to database file if
> >> using sqlite3.
> >> DATABASE_USER = 'username' # Not used with sqlite3.
> >> DATABASE_PASSWORD = 'password' # Not used with sqlite3.
> >> DATABASE_HOST = 'mysql.mysite.com' # Set to empty string
> >> for localhost. Not used with sqlite3.
> >> DATABASE_PORT = '' # Set to empty string for default. Not
> >> used with sqlite3.
>
> >> # Local time zone for this installation. All choices can be found
> >> here:
> >> #
> >>http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATE...
> >> TIME_ZONE = 'America/Seattle'
>
> >> # Language code for this installation. All choices can be found here:
> >> #http://www.i18nguy.com/unicode/language-identifiers.html
> >> # For windows, you must use 'us' instead
> >> LANGUAGE_CODE = 'en-us'
>
> >> SITE_ID = 1
>
> >> # Absolute path to the directory that holds media.
> >> # Example: "/home/media/media.lawrence.com/"
> >> # Image files will be stored off of this path.
> >> MEDIA_ROOT = "/home/username/media/media.mysite.com/"
> >> # URL that handles the media served from MEDIA_ROOT. Use a trailing
> >> slash.
> >> # Example: "http://media.lawrence.com/"
> >> MEDIA_URL = 'http://media.mysite.com/'
> >> # URL that handles the media served from SSL. You only need to set
> >> this
> >> # if you are using a non-relative url.
> >> # Example: "https://media.lawrence.com"
> >> # MEDIA_SECURE_URL = "https://foo.com/"
> >> # URL prefix for admin media -- CSS, JavaScript and images. Make sure
> >> to use a
> >> # trailing slash.
> >> # Examples: "http://foo.com/media/", "/media/".
> >> ADMIN_MEDIA_PREFIX = '/admin_media/'
>
> >> # Make this unique, and don't share it with anybody.
> >> SECRET_KEY = 'My S3cr3t K3y'
>
> >> # List of callables that know how to import templates from various
> >> sources.
> >> TEMPLATE_LOADERS = (
> >> 'django.template.loaders.filesystem.load_template_source',
> >> 'django.template.loaders.app_directories.load_template_source',
> >> # 'django.template.loaders.eggs.load_template_source',
> >> )
>
> >> MIDDLEWARE_CLASSES = (
> >> "django.middleware.common.CommonMiddleware",
> >> "django.contrib.sessions.middleware.SessionMiddleware",
> >> "django.middleware.locale.LocaleMiddleware",
> >> "django.contrib.auth.middleware.AuthenticationMiddleware",
> >> "django.middleware.doc.XViewMiddleware",
> >> "threaded_multihost.middleware.ThreadLocalMiddleware",
> >> "satchmo_store.shop.SSLMiddleware.SSLRedirect",
> >> # "satchmo_ext.recentlist.middleware.RecentProductMiddleware",
> >> )
>
> >> #this is used to add additional config variables to each request
> >> # NOTE: If you enable the recent_products context_processor, you MUST
> >> have the
> >> # 'satchmo_ext.recentlist' app installed.
> >> TEMPLATE_CONTEXT_PROCESSORS = (
> >> 'django.core.context_processors.auth',
> >> 'django.core.context_processors.media',
> >> # 'satchmo_ext.recentlist.context_processors.recent_products',
> >> 'satchmo_store.shop.context_processors.settings',
> >> 'django.core.context_processors.i18n'
> >> )
>
> >> ROOT_URLCONF = 'mysite.urls'
>
> >> # TEMPLATE_DIRS = (
> >> # # Put strings here, like "/home/html/django_templates".
> >> # # Always use forward slashes, even on Windows.
> >> # os.path.join(DIRNAME, "templates"),
> >> # )
>
> >> INSTALLED_APPS = (
> >> 'satchmo_store.shop',
> >> 'django.contrib.admin',
> >> 'django.contrib.admindocs',
> >> 'django.contrib.auth',
> >> 'django.contrib.contenttypes',
> >> 'django.contrib.comments',
> >> 'django.contrib.sessions',
> >> 'django.contrib.sitemaps',
> >> 'django.contrib.sites',
> >> 'registration',
> >> 'sorl.thumbnail',
> >> 'satchmo',
> >> 'keyedcache',
> >> 'livesettings',
> >> 'satchmo_store.contact',
> >> 'product',
> >> # ****
> >> # * Optional feature, product brands
> >> # * Uncomment below, and add the brand url in your satchmo_urls
> >> setting
> >> # * usually in local_settings.py
> >> # ****
> >> #'satchmo_ext.brand'
> >> 'shipping',
> >> 'payment',
> >> 'payment.modules.giftcertificate',
> >> 'satchmo_store.contact.supplier',
> >> # *****
> >> # * Optional feature - admin toolbar for satchmo
> >> # * Uncomment below to enable
> >> # *
> >> # *****
> >> #'satchmo_ext.satchmo_toolbar',
> >> 'satchmo_utils',
> >> 'satchmo_utils.thumbnail',
> >> 'l10n',
> >> 'tax',
> >> # 'satchmo_ext.recentlist',
> >> 'satchmo_ext.wishlist',
> >> 'satchmo_ext.upsell',
> >> 'satchmo_ext.productratings',
> >> 'app_plugins',
> >> # ****
> >> # * Optional Feature, Tiered shipping
> >> # * uncomment below to make that shipping module available in your
> >> live site
> >> # * settings page. enable it there, then configure it in the
> >> # * admin/tiered section of the main admin page.
> >> # ****
> >> #'shipping.modules.tiered'
> >> # ****
> >> # * Optional feature newsletter
> >> # ****
> >> #'satchmo_ext.newsletter',
> >> # ****
> >> # * Optional feature product feeds
> >> # * These are usually for googlebase
> >> # ****
> >> #'satchmo_ext.product_feeds',
> >> # ****
> >> # * Optional feature, tiered pricing
> >> # * uncomment below, then set up in your main admin page.
> >> # ****
> >> #'satchmo_ext.tieredpricing',
> >> # ****
> >> # * Highly recommended app - use this to have access to the great
> >> # * "Jobs" system. See
> >>http://code.google.com/p/django-command-extensions/
> >> # * Make sure to set up your crontab to run the daily, hourly and
> >> monthly
> >> # * jobs.
> >> # ****
> >> #'django_extensions',
> >> 'mysite.store',
> >> )
>
> >> AUTHENTICATION_BACKENDS = (
> >> 'satchmo_store.accounts.email-auth.EmailBackend',
> >> 'django.contrib.auth.backends.ModelBackend',
> >> )
>
> >> AUTH_PROFILE_MODULE='contact.Contact'
> >> LOGIN_REDIRECT_URL = '/accounts/'
>
> >> # Locale path settings. Needs to be set for Translation compilation.
> >> # It can be blank
> >> # LOCALE_PATHS = ""
>
> >> # Language code for this installation. All choices can be found here:
> >> #http://www.i18nguy.com/unicode/language-identifiers.html
> >> LANGUAGE_CODE = 'en-us'
>
> >> # Languages for your site. The language name
> >> # should be the utf-8 encoded local name for the language.
> >> gettext_noop = lambda s:s
>
> >> LANGUAGES = (
> >> ('en', gettext_noop('English')),
> >> )
>
> >> from django.conf.urls.defaults import patterns, include
>
> >> SATCHMO_SETTINGS = {
> >> # this will override any urls set in the store url modules
> >> 'SHOP_URLS' : patterns('',
> >> # disable this if you don't want multi-language
> >> (r'^i18n/', include('l10n.urls')),
>
> >> # paypal urls need special treatment
> >> # (r'^checkout/pay/$',
> >> 'payment.modules.paypal.checkout_step2.pay_ship_info',
> >> # {'SSL': False}, 'satchmo_checkout-step2'),
> >> # (r'^checkout/confirm/$',
> >> 'paypal.checkout_step3.confirm_info',
> >> # {'SSL': False}, 'satchmo_checkout-
> >> step3'),
> >> ),
>
> >> # This is the base url for the shop. Only include a leading slash
> >> # examples: '/shop' or '/mystore'
> >> # If you want the shop at the root directory, set SHOP_BASE to ''
> >> 'SHOP_BASE' : '/store',
>
> >> # Set this to true if you want to use the multi-shop features
> >> # of satchmo. It requires the "threaded_multihost" application
> >> # to be on your pythonpath.
> >> 'MULTISHOP' : False,
> >> }
>
> >> # Load the local
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---