Configuring Swat Revisited
Russ Brucks
russb at kfoc.net
Mon Mar 5 22:22:00 GMT 2001
Okay, here's what you need to do. You have to configure apache. This won't
be too hard. You will need to edit the httpd.conf located in
/etc/httpd/conf directory. Look through the httpd.conf file until you find
this line:
#Servername localhost
It may or may not have the # in front of it. You need to edit this line and
make it say:
Servername yourservernamegoeshere
For example, my server is named discfarm, so this line looks like this in my
httpd.conf file:
Servername discfarm
Notice there is no # in front of the line. Putting a # in front of a line
makes apache think it is just a comment. (A very common Linux/Un*x
practice) The httpd.conf is a big file, in my file the line containing
'Severname discfarm' was number 398. You can determine on what line this
occurs in your file by using this command:
grep -ni "servername" /etc/httpd/conf/httpd.conf
The output of the command is line number : line string
You may also need to enable the CGI script handler. I'm not sure if SWAT
uses this or not. Use grep again to find the line number for this change:
grep -ni "AddHandler cgi-script" /etc/httpd/conf/httpd.conf
Mine reported it to be line number 810. (Learn to use grep, it is a
powerful ally!)
All you need to do to enable the AddHandler cgi-script line is to remove the
# from in front of it. If you are familiar with the vi text editor, you can
start vi with:
vi +linenumber httpd.conf For example, vi +810 httpd.conf will start
the editor right at the 810th line.
If you are unsure how to use vi (it can be a bit intimidating at first until
you understand how it operates) then either read the man page on vi, or use
another editor you are confortable with. Once all of this is done, go ahead
and restart the apache daemon with:
/etc/rc.d/init.d/httpd restart
This should get you a properly configured web server to run SWAT. Hopefully
this will get you off and running. If not feel free to email me again.
Cheers,
Russ
===== Original Message from stcornelius at Tusk.Edu (Sean Cornelius) at 3/05/01
2:47 pm
>Could you please send a copy of yours, somehow mines is not configured
>correct. I ran a testparm and it used the smb.conf form
>/etc/samba/smb.conf. When I tried to open the apache, it said failed. "Use
>the Servername directive to set it manually". I'm lost now, if I need to
>start from scratch I'm willing to do so. I Appreciate all the help you have
>given so far. I hope we can resolve this. All the ocumentation is based off
>the old Samba. HELP!!!!!!!!!
>----- Original Message -----
>From: "Russ Brucks" <russb at kfoc.net>
>To: "Sean Cornelius" <stcornelius at Tusk.Edu>
>Sent: Friday, March 02, 2001 2:37 PM
>Subject: RE: FWD: Configuring Swat
>
>
>> Hmmm... There should have already been an entry for swat in the services
>> file... Did you check to see if it was already there first? I'm not sure
>> what it would do if it were there twice. If it is there twice then remove
>> one of them. Also, what exactly did you add to the xinetd.conf?? My
>> xinetd.conf is a very small file, not really much to add to it. You
>didn't
>> say what you changed on that... Perhaps that is fouling it up. Did you
>> make backups of your files before hand editing them? Always a good
>idea...
>> If not I can send mine to you. Do you have apache running? Can you bring
>> up the Apache test page by browsing to http://hostname ??? If apache
>isn't
>> running that could be causing this problem. To start apache run this
>> command:
>>
>> /etc/rc.d/init.d/httpd start
>>
>> If apache wasn't running and you now want it to start the next time you
>> reboot (instead of having to start it manually) you need to run this
>> command:
>>
>> /sbin/chkconfig --level 345 httpd on
>>
>> Then run:
>>
>> /sbin/chkconfig --list httpd
>>
>> This should show you that httpd is ON during runlevels 3, 4, and 5
>>
>> Last but not least, have you tried totally restarting the server? Perhaps
>> there is another daemon that needs to be restarted. I recall restarting
>> many services when I was trying to figure this one out... unfortunately
>> that was months and months ago, so I'm trying to go off my less than
>perfect
>> memory... Hope this helps. Please feel free to email back for more help.
>>
>> Russ
>>
>> ===== Original Message from stcornelius at Tusk.Edu (Sean Cornelius) at
>3/02/01
>> 2:17 pm
>> >Hey Russ, I greatly appreciated the words of advice and it must have
>worked
>> >to some extent. I reatart the xinetd and it said "o.k."The only thing now
>is
>> >when I went to the browser and typed http://localhost:901 the machines
>gave
>> >me a error of connection refused, server not accepting connection or
>server
>> >is busy. I must have configured something else incorrectly. I edited the
>> >file you spoke of the exact same way you sent, I had to delete some lines
>> >that were there. I not sure if I was supposed to do that but anyhow this
>> >what I did do. I added in the /etc/services file "swat 901/tcp" and
>> >another line in the xinetd.conf file. I have a feeling this was incorrect
>> >and don't know the consequences of these actions. HELP, thank you
>> >----- Original Message -----
>> >From: "Russ Brucks" <russb at kfoc.net>
>> >To: "Sean Cornelius" <stcornelius at Tusk.Edu>
>> >Cc: "samba" <samba at lists.samba.org>
>> >Sent: Friday, March 02, 2001 1:43 PM
>> >Subject: RE: FWD: Configuring Swat
>> >
>> >
>> >> Hi Sean,
>> >>
>> >> I had this problem when I upgraded our servers to RedHat 7. In RedHat
>7
>> >> they changed from running the inetd.d to running xinetd.d. This is the
>> >> daemon that figures out what programs to start when a port is accessed.
>> >> Port 901 is for swat, this is configured in your /etc/services file.
>In
>> >the
>> >> /etc/xinetd.d/ directory you'll find a file called swat. Edit this
>file
>> >so
>> >> it looks like this:
>> >>
>> >> service swat
>> >> {
>> >> port = 901
>> >> socket_type = stream
>> >> wait = no
>> >> user = root
>> >> server = /usr/sbin/swat
>> >> log_on_failure += USERID
>> >> }
>> >>
>> >> The swat service is disabled by default. This will enable it. Also,
>be
>> >> sure to to restart the xinetd.d or else you will be left scratching
>your
>> >> head, wondering why I gave you bum scoop. :-) You can restart
>xinetd.d
>> >by
>> >> running this command. (You should be doing all of this as root, btw.)
>> >>
>> >> /etc/rc.d/init.d/xinetd restart
>> >>
>> >> That should get you running SWAT. If you have any other questions,
>feel
>> >> free to email me at russb at kfoc.net
>> >>
>> >> cheers,
>> >>
>> >> Russ
>> >>
>> >>
>> >>
>> >>
>> >> ===== Original Message from stcornelius at Tusk.Edu (Sean Cornelius) at
>> >3/02/01
>> >> 1:21 pm
>> >> >----- Original Message -----
>> >> >From: Sean Cornelius
>> >> >To: samba at lists.samba.org
>> >> >Sent: Friday, March 02, 2001 11:59 AM
>> >> >Subject: Configuring Swat
>> >> >
>> >> >
>> >> >I'm just learning how yo use Samba, the version I downloaded is Samba
>> >2.0.7. Needless to say
>> >> this is my first time and I'm lost. I'm sure Samba is loaded to the
>> >system.
>> >> Oh I using Linux RedHat 7.0. I'm now lost on how to get the swat
>working,
>> >if
>> >> anyone could shed any light on this
>> >> >subject it would be greatly appreciated.
>> >> >
>> >> >Sean Cornelius
>> >>
>> >>
>> >>
>>
>>
>>
>>
More information about the samba
mailing list