|
Am developing a CMS with Wordpress and need a Q&A website to compliment it. My host is BlueHost.
I thought it would be easier to screencast my problem, which can be watched here. All I want is to be confident that I have a clean + stable install. This may sound lazy, but in all truth, this looks like its beyond my skillset and unless you can spot something basic that I have missed, I imagine I am still a long way off getting this up and running. EDIT - answered Qs in comments. Once resolved, I will tidy this all up Found this link which has slight variations in the htaccess file. I copied these changes, but still ended up with a 500 error. My htaccess file. My osqa.fcgi file
Its only when I uncomment:
That I get the 500 error.
Any ideas on how to proceed? Let me know if you want me to screencast anything.
showing 5 of 6
show 1 more comments
|
|
Here's roughly what I did: this can go into the wiki: This is a merge of https://www.bluehost.com/cgi/help/000531 and http://wiki.osqa.net/display/docs/Installing+OSQA+on+BlueHost+Using+fast-cgi Go to CPanel, and create a subdirectory of your public_html - I'll call it osqa here, you call it what you like. So we've now got ~/public\\_html/osqa. Now create a subdomain in CPanel that is served from public\\_html/osqa . I'll use example.com as the domain, and osqa.example.com as the subdomain. Just don't try to use a subdirectory. Bite the bullet, make a subdomain. Find out the right version number of Django to use. I think 1.2.4 is ok. Check the latest in the 1.2 or x.x stream, check other questions about django versions here. Then login by SSH Replace the link in the following line, with the download link of the tarball of the django version you want - let's call it 1.2.X for now:
Note the "." in front of local each time - we are installing to ~/.local , not to ~/local And you see that python2.6? That's really important. Anywhere you're directed to run a python command from the command line during installation, use python2.6, rather than just python. Add the following to the end of your ~/.bashrc file:
Log out of SSH, and log back in, to make this change have effect. This next bit is taken almost verbatim from https://www.bluehost.com/cgi/help/000531 , with a couple of important changes. You can test your installation of Django to see if it worked by starting the Python interpretor by typing python2.6 at the command prompt and hitting enter. You'll get the Python interactive interpretor, where you can type import django and hit enter. If it gives an error, then there is a problem with your installation. If no error is given, then you've successfully installed Django to your Python path. Go ahead and exit the Python shell by typing ctrl+d. If you were unable to import Django, try re-logging in to your shell, and try again. If it still doesn't work, double check to make sure that your Python path is correct, and that Django really resides in a directory on the Python Path. To see what this list of directories is, enter python2.6, and type "import sys; sys.path", and press enter. This should give you a list of directories. This should include any directories you listed in your .bashrc file for PYTHONPATH. Ctrl-D to exit python again. Check for any typos in your .bashrc file. As long as the django directory is in one of those directories listed, then you should be able to do the import. If it isn't in any of those directories, try re-installing Django. From the SSH command prompt (not the Python one, the SSH shell one), enter django-admin.py. You should get a usage message with a list of management commands that can be run. If you get "command not found", then there was a problem with the installation of Django. To diagnose a "command not found", double check that there are no typos in your .bashrc file for the PATH variable that you added. Re-log in to ensure that this .bashrc change is taking place. Type echo $PATH at the command prompt to get a list of directories on your path, and echo $PYTHONPATH to check the Python path (but you guessed that from the name, right?). The django-admin.py file should be in your ~/.local/bin directory. If it isn't in that directory, try re-installing Django. OK, so now you've got a working Django - you need some extra python libraries. Go get the latest setuptools from one of the links at http://pypi.python.org/pypi/setuptools#downloads Put it on your server, in a temporary directory. Then, in SSH, go to that directory, and run the following commands in turn: (replace the setuptools-XXX.egg bit in the first command, with the exact name of the setuptools file that you downloaded)
Now we install OSQA:
copy osqa/settings\\_local.py.dist to osqa/settings\\_local.py and edit according to the INSTALL directions. Finally, from the OSQA directory ( ~/.local/lib/python2.6/site-packages/osqa ) you must run:
And then press Ctrl-C to stop the local python server. In your ~/public_html/osqa directory, create a file .htaccess with the following content:
And create a file osqa.fcgi with the following content: note that there are three occurrences of USERNAME below - change each of them to your bluehost username
Change its attributes to make osqa.fcgi executable:
Any time you change any of the *.py files, such as settings_local.py , then from SSH do
That touch tells the server realises that files have been updated. If you don't do this touch, your changes won't take effect. Now, all being well, you should have a working OSQA installation! 1
Andrew_S should be given a medal. The stranger helped me out via email, and when he saw I was hopeless = logged in and did the install for me. Its ppl like Andrew that make this world go around. Please vote him up!
(19 Apr '11, 19:35)
Simon
1
there's a typo in "
(23 Aug '11, 02:43)
Catskul
Thanks Catskul - I've fixed both "ptyhon"s now
(23 Aug '11, 06:34)
Andrew_S ♦
|
Hi Simon, I've never used Bluehost, but it looks a reasonable installation. What timezone are you in - I'm in GMT+1, and might be able to help you out, if we can fix a time which will be convenient for both of us, and we can do the installation together, using skype or something to liaise.
Im in Melbourne, 9hrs ahead of you, but I am mainly working on this at nights anyhow. I have gmail chat/talk - simon.robin.jackson, but can sort my skype out if you want? Really appreciate this, who are you?
I'm an academic at UCL, a director of a consultancy - http://londonanalytics.info/ http://energynumbers.info/ , and a programmer. Take the first of those two domains, and email me - andrew at ... , once you've got your ssh access
ok, had chance to look a the screencast - looks like the server is choking on your changes to .htaccess
1) in your apache error log (/var/log/error_log or ~/logs/apache2/error_log or something) - there should be a specific report on what exactly in the rewrite rule is choking it.
2) If you just comment out one of the two lines, does the server at least serve a page? Try one, then the other.
3) Does creativitycloud.fcgi need a "/" in front of it?
4) If, when the server is working, you directly try to browse to creativitycloud.fcgi , does that work?
5) if you comment out all your other rewrite rules / conds apart from the osqa ones, does the server work?
Ill run through them now. Another thought. Should I be setting up a sub-domain to do this one? I was reading on other posts, that OSQA is a pain to setup in a folder beneath public_HTML - lots of links need updating?
Yes, if I served to a sub-directory, I found it hard to get all the links right. Most were, but some weren't.
So I'd say: don't have osqa served to a URL like: http://mydomain.com.au/answers/ . Instead, (if your hosting service permits it), serve it to something like: http://answers.mydomain.com.au/