?
Solved

Getting suEXEC to work on Apache2

Posted on 2003-03-12
7
Medium Priority
?
1,141 Views
Last Modified: 2012-05-04
I've been trying to figure out why suEXEC makes my scripts give out 500 errors. Without the suEXEC SuexecUserGroup command everything works fine.
I know its installed and configured properly cause all I had to do was load the module in the httpd.conf files and it outputs the message in the log files like its supposed to.

I have users set up for each host and they all belong the the group www.
Now for any particular host I use:
SuexecUserGroup example.com www
And when I run the script I get a 500 error. Premature end of script headers.

Well not sure why this is. Remember that it WORKS FINE when I dont use the SuexecUserGroup command.
I am running RedHat 8, Apache 2, Perl 5.8
This is how my virtualhost's looks.

<VirtualHost *>
    DocumentRoot /var/www/example.com/html
    ServerName www.example.com
    ServerAlias example.com
    ServerAdmin jeyb@rogers.com
    ScriptAlias /cgi-bin/ /var/www/example.com/cgi-bin/
    SuexecUserGroup example.com www
    ErrorLog /var/www/example.com/error_log
    CustomLog /var/www/example.com/example.com_log main
    <Directory "/var/www/example.com">
        Options +Includes
    </Directory>
    <Directory "/var/www/example.com/html">
        AllowOverride all
    </Directory>
    <Directory "/var/www/example.com/cgi-bin">
        Options +ExecCGI
    </Directory>
</VirtualHost>

Please tell me how to fix this.
Thanks,
Jey
0
Comment
Question by:jeyb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 8

Accepted Solution

by:
heskyttberg earned 600 total points
ID: 8140004
Hi!

This logfile might be pretty helpful:
/var/log/httpd/suexec.log

What I noticed is that oyu need same permissons on the /var/www/example.com/cgi-bin dir as there is on the files. This dir and files in it also need same user/group owners as you set in the SuexecUserGroup directive.

If you make theese changes everything will work great.

Regards
/Hans - Erik Skyttberg
0
 
LVL 8

Expert Comment

by:heskyttberg
ID: 8140005
oyu = you, :)
0
 

Author Comment

by:jeyb
ID: 8177280
I tried that but I keep getting 500 errors even though the scripts perfectly fine.
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 8

Expert Comment

by:heskyttberg
ID: 8177573
Hi!

Oh, and the files or dir can't be group or world readable.

Every change you do and test, check in following gile for error and change permissons accordingly:
/var/log/httpd/suexec.log

If I remember correctly it was there it's saved, any permisson errors will be in there and just go fix them and it will work.

Regards
/Hans - Erik Skyttberg
0
 

Author Comment

by:jeyb
ID: 8178127
I get these errors:
[2003-03-20 14:27:27]: user mismatch (nobody instead of apache)
[2003-03-20 14:27:29]: user mismatch (nobody instead of apache)

Aren't I supposed to run apache as user nobody and group nobody?

And where exactly do I put in the SuexecUserGroup. Like after which line.
0
 

Author Comment

by:jeyb
ID: 8178143
also I tried setting the user to apache and group to nobody and still the same 500 error.
0
 

Author Comment

by:jeyb
ID: 8185134
Thanks.
It worked I just forgot to do something also thats why it didn't work the second time.

:)
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question