Unfortunately, the page
http://en.opensuse.org/Apache_Quickstart_HOWTO
has got lost in the WEB removal!
Having installed Apache with Yast for SUSE 11.4 the command
find / -name apache
results in
/etc/apparmor.d/apache2.d
/etc/apparmor.d/abstractions/apache2-common
/etc/apache2
/etc/sysconfig/SuSEfirewall2.d/services/apache2-ssl
/etc/sysconfig/SuSEfirewall2.d/services/apache2
/etc/sysconfig/apache2
/etc/init.d/apache2
/etc/logrotate.d/apache2
/usr/share/susehelp/meta/Manuals/Productivity/apache.en.desktop
/usr/share/kde4/apps/katepart/syntax/apache.xml
/usr/share/omc/svcinfo.d/apache2.xml
/usr/share/apache2
/usr/share/apache2/icons/apache_pb2_ani.gif
/usr/share/apache2/icons/apache_pb2.gif
/usr/share/apache2/icons/apache_pb.png
/usr/share/apache2/icons/apache_pb.gif
/usr/share/apache2/icons/apache_pb2.png
/usr/share/apache2/apache-20-22-upgrade
/usr/share/doc/packages/apache2
/usr/share/man/man8/apachectl2.8.gz
/usr/share/vim/vim73/syntax/apache.vim
/usr/share/vim/vim73/syntax/apachestyle.vim
/usr/lib/apache2_MMN
/usr/lib/apache2-event
/usr/lib/apache2-worker
/usr/lib/apache2-prefork
/usr/lib/apache2-itk
/usr/lib/apache2/usr/sbin/apache2ctl
/var/cache/apache2
/var/log/apache2
/var/lib/apache2
According to
Apache HTTP Server Version 2.0 Documentation - Apache HTTP Server
the server is started with the command
appachectl
Executing the command
gunzip /usr/share/man/man8/apachectl2.8.gz
there appears an executable “/usr/sbin/apache2ctl” but
/usr/sbin/apache2ctl start
httpd2: Syntax error on line 188 of /etc/apache2/httpd.conf: Could not open configuration file /etc/apache2/sysconfig.d/include.conf: No such file or directory
With the YAST installation there is nowhere a “*.conf” file!!
Is the SUSE setup not anymore in order? There must be loads of people to have installed Apache in SUSE in the past! Please advice
Actually, I found the archived
Apache Quickstart HOWTO - openSUSE
Here one finds that one should not use
/usr/sbin/apache2ctl start
as is said in
Apache HTTP Server Version 2.0 Documentation - Apache HTTP Server
but instead
rcapache2 start
in fact
linux-7bll:/usr/sbin # ls *apache*
apache2ctl rcapache2
One finds the for the SUSE setup useless nominal command “apache2ctl” together with the undocumented command “rcapache2” that is the one that has to be used! The Yast setup is not really clean!
Without the “Apache_Quickstart_HOWTO” that is not available in the current documentation one is quite lost!
Am 04.12.2011 13:16, schrieb stamcose:
> together with the undocumented command “rcapache2” that is the one that
> has to be used!
Why do you say it is undocumented?
The opensuse reference in chapter 30.3 clearly states
To start, stop, or manipulate Apache on a running system, use the init
script /usr/sbin/rcapache2. For general information about init scripts,
refer to Section 17.2.2, “Init Scripts”.
–
PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.3 |
nVidia ION | 3GB Ram
Am 04.12.2011 12:16, schrieb stamcose:
>
> Unfortunately, the page
>
> SDB:Apache installation - openSUSE Wiki
>
> has got lost in the WEB removal!
>
Why not simply look at the official documentation “openSUSE Reference”
/usr/share/doc/manual/opensuse-manuals_en/manual/book.opensuse.reference.html
It is installed by default on your system, if you are using kde it is
also in the kde help center (for gnome I do not know if it is in yelp).
At the end it tells you also where to look for the correct link
30.9.4. Miscellaneous Sources
If you experience difficulties specific to Apache in openSUSE, take a
look at the openSUSE wiki at http://old-en.opensuse.org/Apache. The
history of Apache is provided at
About the Apache HTTP Server Project - The Apache HTTP Server Project. This page also explains why
the server is called Apache.
And the link http://old-en.opensuse.org/Apache works.
–
PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.3 |
nVidia ION | 3GB Ram
But
Apache - openSUSE
does not help for the next fundamental problem
The program “first.pl” is properly in the cgi directory
linux-7bll:/srv/www/htdocs # file /srv/www/cgi-bin/first.pl
/srv/www/cgi-bin/first.pl: a /usr/bin/perl script text
How should the “action” parameter of the “form” tag be set?
Assuming the directory to be predefined (like “/srv/www/htdocs” is) one would assume
<html>
<form name="input" action="first.pl" method="post">
Text: <input type="text" name="mytext" />
<input type="submit" value="Submit" />
</form>
</html>
Or possibly everything explicit:
<html>
<form name="input" action="http://192.168.0.134/srv/cgi-bin/first.pl" method="post">
Text: <input type="text" name="mytext" />
<input type="submit" value="Submit" />
</form>
</html>
or possibly:
<html>
<form name="input" action="http://192.168.0.134/first.pl" method="post">
Text: <input type="text" name="mytext" />
<input type="submit" value="Submit" />
</form>
</html>
But in all cases: “The requested URL was not found on this server”!
Thankful for help ho to send the data to
" /srv/www/cgi-bin/first.pl"
Being myself no apache expert (esp. not for cgi scripts) I would say the
url you should use is
action=“cgi-bin/first.pl”
or if you want to use the absolute path
action=“http://192.168.0.134/cgi-bin/first.pl”
I would also say since in the second case you access your own machine as
if it is from outside you need to ensure that the firewall opens port 80
in the yast firewall.
I hope some expert can help better here.
–
PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.3 |
nVidia ION | 3GB Ram
stamcose wrote:
> How should the “action” parameter of the “form” tag be set?
>
> Assuming the directory to be predefined (like “/srv/www/htdocs” is) one
> would assume
>
> Code:
> --------------------
>
> <html>
> <form name=“input” action=“first.pl” method=“post”>
> Text: <input type=“text” name=“mytext” />
> <input type=“submit” value=“Submit” />
> </form>
> </html>
>
> --------------------
That looks sensible. It sounds like you need to do some reading on how
to configure Apache for CGI scripts. You might start at:
http://httpd.apache.org/docs/2.2/howto/cgi.html
which should also be loaded on your machine, I think.
Actually, the syntax to start program “bash” residing in /srv/www/cgi-bin is
<form name="input" action="/cgi-bin/bash" method="post">
Text: <input type="text" name="mytext" />
<input type="submit" value="Submit" />
</form>
In the Apache of the SUSE distribution there must be a
ScriptAlias /cgi-bin/ /srv/www/cgi-bin/
see
HowTo: Configure a Linux Apache Web Server on Suse/openSUSE for SSI, Includes, CGI, Common Gateway Interface, AddHandler, ExecCGI, AllowOverride, htaccess, DocumentRoot
This is clearly a standard, the html code must run on all kinds of servers supporting CGI
stamcose wrote:
> Actually, the syntax to start program “bash” residing in
> /srv/www/cgi-bin is
>
> Code:
> --------------------
>
> <form name=“input” action="/cgi-bin/bash" method=“post”>
> Text: <input type=“text” name=“mytext” />
> <input type=“submit” value=“Submit” />
> </form>
>
> --------------------
True. That’s the simplest to set up.