Version 9 (modified by 16 years ago) ( diff ) | ,
---|
How to enable SWAT as a Apache CGI
This page provides a quick cookbook to setup SWAT as a CGI for Apache on eComstation & OS/2.
Prerequsites:
- Make sure you have downloaded Apache2 and unziped.
- We assume Apache2 was unzipped to x:\apache2 and samba was installed to x:\samba.
- Copy x:\apache2\conf\httpd.conf.sample to x:\apache2\conf\httpd.conf
- Edit x:\apache2\conf\httpd.conf
ServerRoot "x:/apache2"
# remove the # infront of the below modules
Loadmodule authn_file_module modules/authn_fi.dll
LoadModule auth_basic_module modules/auth_bas.dll
DocumentRoot "x:/apache2/htdocs"
# This should be changed to whatever you set
DocumentRoot
to.
<Directory "x:/apache2/htdocs">
Alias /swat/ "x:/samba/swat/"
ScriptAlias /cgi-bin/samba/ "x:/samba/"
ScriptAlias /cgi-bin/ "x:/apache2/cgi-bin/"
PassEnv UNIXROOT
PassEnv ETC
PassEnv PATH
PassEnv TMPDIR
<Directory "x:/samba">
AllowOverride All
Options None
Order allow,deny
Allow from all
AuthName "Samba Web Admin Tool"
AuthType Basic
AuthUserFile x:/apache2/conf/users
require valid-user
</Directory>
- Adjust startup.cmd in x:\apache2 with set beginlibpath=x:\apache2\bin;x:\apache2\modules
- create user with: x:/apache2/bin/htpasswd -c x:/apache2/conf/users my_user_name
- Start startup.cmd (if all went well Apache starts)
Using SWAT:
- To use SWAT also to start/stop Samba Server, Samba Server should have been installed with the WPI. Otherwise swathelp.cmd and smb.cmd are missing
- Open the Browser and point it to 127.0.0.1/cgi-bin/samba/swat.exe
- Now you should see the SWAT interface to configure Samba server