Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mailman premature end of script headers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
voidzero
Bodhisattva
Bodhisattva


Joined: 21 Jul 2002
Posts: 265
Location: Grnn

PostPosted: Sat Aug 06, 2005 2:29 pm    Post subject: mailman premature end of script headers Reply with quote

I have created my own mailman installation on a system I do have root access on, but already hosts a mailman version and I wanted to run my own.

The group and username I created both are 'vocisml'. The cgi are not suexeced so every script should be ran as www-data.

I launched configure with these parameters:

./configure --prefix=/home/vocisml/install/mailman --with-groupname=vocisml --with-username=vocisml --with-cgi-gid=www-data

After this I ran make and make install, ofcourse.

At this point I edited my apacheconfig and mm_cfg.py

apache config:
-----
ScriptAlias /mailman/ /home/vocisml/install/mailman/cgi-bin/
Alias /pipermail/ /home/vocisml/install/mailman/archives/public/
<Directory /home/vocisml/install/mailman/cgi-bin/>
Options +FollowSymlinks +ExecCGI
</Directory>
<Directory /home/vocisml/install/mailman/archives/public/>
Options +Indexes
</Directory>
-----

mm_cfg:
-----
DEFAULT_EMAIL_HOST = 'voidzero.net'
DEFAULT_URL_HOST = 'voidzero.net'
DEFAULT_URL_PATTERN = 'http://%s/mailman/'
DEFAULT_ARCHIVE_PRIVATE = 1
ARCHIVE_TO_MBOX = 0
DEFAULT_ARCHIVE_VOLUME_FREQUENCY = 3
DEFAULT_DIGEST_VOLUME_FREQUENCY = 3

MTA = 'Postfix'
-----
Now it was time to edit the postfix configs:
added alias_maps = hash:/etc/aliases, hash:/home/vocisml/install/mailman/data/aliases
-----

I ran check-perms -f and all permissions are good now. I manually changed all of these scripts
to group www-data. When I su as user www-data and launch the file 'admin' for example,
all is good. When I visit http://voidzero.net/mailman/admin, or any other page, I now get a 500 error, with
"Premature end of script headers" in my logs. This is where I'm stuck..

I hope someone wants to help me, thanks a lot..
Back to top
View user's profile Send private message
ekutay
l33t
l33t


Joined: 30 Mar 2005
Posts: 636
Location: Berlin

PostPosted: Mon Aug 08, 2005 6:56 pm    Post subject: Re: mailman premature end of script headers Reply with quote

thevoidzero wrote:
I hope someone wants to help me, thanks a lot..
As nobody has answered so far, I will give it a try, admitting that I do not now mailman, but apache.

In which language are the cgi scripts returning the mentioned errors?

Copy or create a test.cgi, give it the same permissions and ownerships as the other scripts and try to run it. The content of a standard test.cgi could be
Quote:
#!/bin/sh

# disable filename globbing
set -f

echo Content-type: text/plain
echo

echo CGI/1.0 test script report:
echo

echo argc is $#. argv is "$*".
echo

echo SERVER_SOFTWARE = $SERVER_SOFTWARE
echo SERVER_NAME = $SERVER_NAME
echo GATEWAY_INTERFACE = $GATEWAY_INTERFACE
echo SERVER_PROTOCOL = $SERVER_PROTOCOL
echo SERVER_PORT = $SERVER_PORT
echo REQUEST_METHOD = $REQUEST_METHOD
echo HTTP_ACCEPT = "$HTTP_ACCEPT"
echo PATH_INFO = "$PATH_INFO"
echo PATH_TRANSLATED = "$PATH_TRANSLATED"
echo SCRIPT_NAME = "$SCRIPT_NAME"
echo QUERY_STRING = "$QUERY_STRING"
echo REMOTE_HOST = $REMOTE_HOST
echo REMOTE_ADDR = $REMOTE_ADDR
echo REMOTE_USER = $REMOTE_USER
echo AUTH_TYPE = $AUTH_TYPE
echo CONTENT_TYPE = $CONTENT_TYPE
echo CONTENT_LENGTH = $CONTENT_LENGTH
you can also just leave the whole variable stuff and simply echo "hello" like
Quote:
#!/bin/sh
set -f

echo Content-type: text/plain
echo
echo "hello"
if the permission settings are alright, this script should return / print out your cgi environment (or hello :)). If not, we have to check your apache settings again.
_________________
-- erol
Back to top
View user's profile Send private message
voidzero
Bodhisattva
Bodhisattva


Joined: 21 Jul 2002
Posts: 265
Location: Grnn

PostPosted: Tue Aug 16, 2005 2:38 pm    Post subject: Reply with quote

Agh, sorry for not replying before. I have tried your things and still it was a lot of struggle.

So yeah, I'm emberassed to say it was suexec all along. Thanks really much for your help ekutay!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum