LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-20-2010, 06:10 PM   #1
Ineedsleep
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Exclamation Apache issues - setting up Django/mod_wsgi


Hi,

Been struggling with setting up web server on my CentOS 5.5 install on a VirtualBox VM. to serve up django for a while - having limited success adn would appreciate any help I can get. I followed the sets at http://www.freshblurbs.com/tutorial-...1-1-centos-5-4. But the website did not materialize.

Now, after futzing around with it for over 3 days, I think I am close.
I have apache, python and django all set up and ready to do.

However, when I try to start up my httpd service it fails..

My server name (on my home network) is Io.

Here is what I have now:
/etc/httpd/conf.d/io.conf
-------
<VirtualHost *:80>
ServerName io
ErrorLog /opt/web/django/iproj/logs/error_log
CustomLog /opt/web/django/iproj/logs/access_log combined
UseCanonicalName Off
Alias /admin_media /opt/python2.6/lib/python2.6/site-packages/django/contrib/admin/media
Alias /static /opt/web/django/iproj/static
WSGIScriptAlias / /opt/web/django/iproj.wsgi
#WSGIDaemonProcess iproj processes=7 threads=1 user=apache group=apache
#WSGIDaemonProcess iproj processes=7 threads=1 display-name=%{GROUP}
</VirtualHost>
---------
The last two line - WSGIDaemon... are commeneted out because I have a the following in my httpd.conf:
LoadModule wsgi_module modules/mod_wsgi.so

When i try to start the httpd service all I get is:
service httpd start
Starting httpd: [FAILED]

The log file (/etc/httpd/logs/error_log) shows the following:
(13)Permission denied: httpd: could not open error log file /opt/web/django/iproj/logs/error_log.
Unable to open logs

when I check the error_log file I get the following:
ll /opt/web/django/iproj/error_log
-rw-rw-rw- 1 apache staff 3 Nov 20 15:46 /opt/web/django/iproj/error_log

Any ideas? Help!!!

thanks,
Jas
 
Old 11-21-2010, 03:18 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,737

Rep: Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585
Quote:
The log file (/etc/httpd/logs/error_log) shows the following:
(13)Permission denied: httpd: could not open error log file /opt/web/django/iproj/logs/error_log.
Unable to open logs
Looks like a permissions problem and since you're running Centos it's most likely SELinux that prevents writing logs in the above directory.
You can change the path to /var/log/httpd/django.log where apache has write sccess and see if it works.

Regards
 
1 members found this post helpful.
Old 11-23-2010, 10:27 PM   #3
Ineedsleep
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
That was it. I disabled selinux and it all worked!

thanks,
jas
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Integrating Django Into Apache cmnorton Linux - Server 1 09-24-2010 12:59 PM
Django jokar.mohsen Linux - Software 1 07-12-2010 07:51 AM
setting up apache from scratch on a linux machine, apache failed message upon bootup dramous43 Linux - Enterprise 2 01-26-2010 07:53 AM
Mumble, murmur, django and mumble-django. Linux.tar.gz Linux - Software 2 02-10-2009 02:47 AM
setting setting umask for apache user only....how?..plz help mickyman Linux - General 0 05-08-2006 04:37 AM


All times are GMT -5. The time now is 11:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration