Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apache --Long-- question, very frustrated!

I think I might just be a complete moron, but I can't get jack to work
on my system (All Apache related).  I've gone through 2 different books
and still can't figure out anything.

Here were all the files reside for Apache

[les cgi-bin]# find / -name httpd -print

First:  I wanted to see what modules are running so I typed httpd -l to
try out the command, I got a reply command not found... I figured that
the path were the executable resides wasn't set, so I cd into every
directory which I felt might might contain that binary and tried it
again, still no luck.  Note:  the server is up and running, you can see
my test page --   --
I can't guarantee that the server will be up.. (and with my luck I have
an open door to my entire system, who knows).  I used Netscape's rpm
version for Apache and installed it as follows:   rpm -U {filename}.
seemed to be ok.  I even Managed to update BIND without any problems (or

were there, who knows).   So basically the Apache Sever appears to be
working, but is it fully functional which leads to my second question.

File Permissions and Java Applets (which i asked about earlier and
received 1 reply), which had some good ideas that seemed very logical,
but then again I may be a moron as I stated previously.... the response
stated the following:

Basically I was told to look in the  httpd.conf file and see what groups

and users had the rights to execute stuff, and here's what I found:

# User/Group: The name (or #number) of the user/group to run httpd as.
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  . On HPUX you may not be able to use shared memory as nobody, and the

#    suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000;
#  don't use Group nobody on these systems!
User nobody
Group nobody

Using that information  i went into the directory where my html file are

and changed the owner and group to nobody for all the files that were
used with the applet:

-rwxr-xr-x   1 nobody   nobody      17445 Jun  9 11:58 font.vac
-rwxr-xr-x   1 nobody   nobody       3076 Jun  9 11:58 text.class
-rwxrwxr-x   1 nobody   nobody      10975 Jun  9 11:58 text3d.class

however, I did not change anything on the htm file (by the way all of
the files in my html directory have the following permissions, is this
even correct?  It seems to work -- doesn't mean it's correct.

-rwxr-xr-x   1 root     root         3944 Jun 13 17:46 MENU.htm

And not surprisingly it still doesn't work.  I have no clue on how to
get the applet to work, I thought that Applets were run on the client
side, not on the server --- again I could be incorrect.

Just for the hell of it I typed group to see what groups I have and this

is what resulted:

[root html]# groups
root bin daemon sys adm disk wheel

This seems kind of odd --- nobody isn't listed, does this mean it isn't
a group or is it just a special group that doesn't show up on this

When I did the command:   ps -ef|grep httpd       this is what follows:

root       585     1  0 12:05 ?        00:00:00 httpd
nobody     589   585  0 12:05 ?        00:00:00 httpd
nobody     590   585  0 12:05 ?        00:00:00 httpd
nobody     591   585  0 12:05 ?        00:00:00 httpd
nobody     592   585  0 12:05 ?        00:00:00 httpd
nobody     593   585  0 12:05 ?        00:00:00 httpd
nobody     594   585  0 12:05 ?        00:00:00 httpd
nobody     600   585  0 12:05 ?        00:00:00 httpd
nobody     601   585  0 12:05 ?        00:00:00 httpd

Does this look correct?
Why can't I get the applet running?

One last Question from el moron....
CGI ...... fun fun.

I setup a basic perl program called, which parses stuff
created from a form, here's the link:

Here's the permissions for the perl file:

-rwxr-xr-x   1 nobody   nobody        616 Jun 14 15:27

Also, my alias for /cgi-bin/ should be correct:
This is what is listed in the httpd.conf file:

ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"

Once I submit the info typed on the web page I got the following error
in my error_log:

[Wed Jun 14 15:11:49 2000] [error] (8)Exec format error: exec of
/home/httpd/cgi-bin/ failed
[Wed Jun 14 15:11:49 2000] [error] [client] Premature end
of script headers: /home/httpd/cgi-bin/

Here is the perl code:

use CGI qw(:standard);

print header(), start_html( "Mail from results" ),\
h1( "Mail from results" );

my $to = parse( "to" );
my $from = parse( "from" );
my $subject = parse( "subject" );
my $body = parse( "body" );

open (MAIL, "|/var/qmail/bin/qmail-inject $to") || die "<p>Error:
Couldn't execute qmail. \n";

print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "subject: $subject\n\n";
print MAIL "$body\m";
close MAIL;

print p( "All right, mailed the following to <tt>$to</tt>:" );
print p( "<pre>\nTo: $to\nFrom: $from\nsubject:
$subject\n\n$body\n</pre> );
print end_html();

One comment about the code, I recently compiled and configured qmail,
what a pain for a novice -- and this is one of those I think it's
working but I really have no clue.  Keep in mind that this perl script
was copied from a book and I made one change:

The book said to use
open (MAIL, "|/usr/lib/sendmail $to") || die "<p>Error: Couldn't execute

qmail. \n";

and i used Becuase the book said to modify code if you use a different
mail system -- I don't know if it's right.

open (MAIL, "|/var/qmail/bin/qmail-inject $to") || die "<p>Error:
Couldn't execute qmail. \n";

I also noticed in my httpd.conf file that the Module for perl was
commented out,
Here's a list of the modules in listed in the file:  Do I need to
un-comment this?

# Note: The order is which modules are loaded is important.  Don't
# the order below without expert advice.
# Example:
# LoadModule foo_module modules/
#LoadModule mmap_static_module modules/
LoadModule vhost_alias_module modules/
LoadModule env_module         modules/
LoadModule config_log_module  modules/
LoadModule agent_log_module   modules/
LoadModule referer_log_module modules/
#LoadModule mime_magic_module  modules/
LoadModule mime_module        modules/
LoadModule negotiation_module modules/
LoadModule status_module      modules/
LoadModule info_module        modules/
LoadModule includes_module    modules/
LoadModule autoindex_module   modules/
LoadModule dir_module         modules/
LoadModule cgi_module         modules/
LoadModule asis_module        modules/
LoadModule imap_module        modules/
LoadModule action_module      modules/
#LoadModule speling_module     modules/
LoadModule userdir_module     modules/
LoadModule alias_module       modules/
LoadModule rewrite_module     modules/
LoadModule access_module      modules/
LoadModule auth_module        modules/
LoadModule anon_auth_module   modules/
LoadModule db_auth_module     modules/
LoadModule digest_module      modules/
LoadModule proxy_module       modules/
#LoadModule cern_meta_module   modules/
#LoadModule cern_meta_module   modules/
LoadModule expires_module     modules/
LoadModule headers_module     modules/
LoadModule usertrack_module   modules/
#LoadModule example_module     modules/
#LoadModule unique_id_module   modules/
LoadModule setenvif_module    modules/
#LoadModule bandwidth_module   modules/
#LoadModule put_module          modules/

# Extra Modules
#LoadModule perl_module        modules/
#LoadModule php_module         modules/
#LoadModule php3_module        modules/

#  Reconstruction of the complete module list from all available modules

#  (static and shared ones) to achieve correct module execution order.
#AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_log_agent.c
AddModule mod_log_referer.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
AddModule mod_auth_db.c
AddModule mod_digest.c
AddModule mod_proxy.c
#AddModule mod_cern_meta.c
#AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
AddModule mod_usertrack.c
#AddModule mod_example.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
#AddModule mod_bandwidth.c
#AddModule mod_put.c

# Extra Modules
#AddModule mod_perl.c
#AddModule mod_php.c
#AddModule mod_php3.c

I wouls appreciate any help , I'm getting sick of playing with what
should very trivial stufff.... Somebody shouls rith a book that answers
basic questions in a straight forward way like to get an CGI-script to
work for your first time do this .... you'll make a million.

Les Pendleton

Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at (Subject line is ignored).

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /