You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David Blomstrom <da...@yahoo.com> on 2004/01/18 05:23:53 UTC

[users@httpd] Access Forbidden! (Is this an Apache error?)

I've got a really bizarre problem that's tough to
troubleshoot, because I don't have a clue what's
causing it.

I have some suspicions it might be linked to Apache,
based on the fact that I only recently installed
Apache, PHP and MySQL and the following error message:

Access forbidden!

You don't have permission to access the requested
directory. There is either no index document or the
directory is read-protected.

If you think this is a server error, please contact
the webmaster.
Error 403
localhost
1/17/2004 8:09:52 PM
Apache/2.0.48 (Win32) mod_perl/1.99_10 Perl/v5.8.0
mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4 


I get this error message when I click on a link to an
atlernate style sheet. In other words, my web page is
linked to several style sheets, and I can click
various JavaScript links to determine which style
sheet controls the page.

Here's some code from the head section that
illustrates the master style sheet and one of the
alternate style sheets:

<link href="css/aaa.css" rel="stylesheet"
type="text/css" />
<link href="css/aaa2.css" rel="alternate stylesheet"
type="text/css" title="Two" />


And here's the link I click to switch to style sheet
aaa2.css:

<a href="#" onclick="setActiveStyleSheet('Two');
return false;" title="Two">Two</a>

The other weird thing is that I have two pages that
are almost identical and are even in the same
envelope. The style sheet switcher suddenly stopped
working with both of them, but only one gives me the
error message I posted above.

Can anyone tell me if this sounds like an Apache error
- or if it almost certainly isn't an Apache problem?

Thanks.

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access Forbidden! (Is this an Apache error?)

Posted by Robert Andersson <ro...@profundis.nu>.
David Blomstrom wrote:
> I have some suspicions it might be linked to Apache,
> based on the fact that I only recently installed
> Apache, PHP and MySQL and the following error message:
>
> Access forbidden!

First, determine what resource this concerns. When you get this error, look
in your access log and look for a 403 status code (after the request line).
There you have exactly what was the problem. Next step is to find the
corresponding line in the error log, to see why it was forbidden. Let us
know you findings.

PS. As you seem to be on Windows, the permissions discussion with Paul might
cause some confusion for you.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access Forbidden! (Is this an Apache error?)

Posted by Paul Laudanski <la...@yahoo.com>.
Hi David, let me throw a quick example at you.

Say for instance you have Apache running as the user
'nobody'.  The group that 'nobody' belongs to is
'nobody' as well.

Now, say the file you are trying to access from the
web is owned by 'david' and the group 'david' belongs
to is 'family'.  

Lets now take a look at the permissions of this file,
say its 'index.html'.

-rw-r----- index.html

Apache running under the user and group 'nobody' would
not ave access to the index.html file.

You would need to set the permissions to something
like this:

-rw-r--r-- index.html

Just in case you don't know how, run a search on
'chmod' to change the mode (attributes/permissions).
--- David Blomstrom <da...@yahoo.com> wrote:
> --- Paul Laudanski <la...@yahoo.com> wrote:
> Can you suggest a topic heading or keywords to
> search
> for? I browsed through the main Apache 2.0 page at
> http://httpd.apache.org/docs-2.0/ and the FAQs but
> didn't see anything that looked relevant.


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Help to hack Redhat .spec file

Posted by Sean Woodlock <ad...@ciscohire.com>.
Ok All i have now  got pass that last error as i noticed the i have openssl
commented out.  Anyway now it stop here looking for the frontpage modules.


m -f libssl.so
gcc -L/usr/src/redhat/BUILD/NSApache/openssl-0.9.7c -shared  -o libssl.so
mod_ssl.lo ssl_engine_config.lo ssl_engine_compat.lo ssl_engine_ds.lo
ssl_engine_dh.lo ssl_engine_init.lo ssl_engine_kernel.lo ssl_engine_rand.lo
ssl_engine_io.lo ssl_engine_log.lo ssl_engine_mutex.lo ssl_engine_pphrase.lo
ssl_engine_vars.lo ssl_engine_ext.lo ssl_scache.lo ssl_scache_dbm.lo
ssl_scache_shmht.lo ssl_scache_shmcb.lo ssl_expr.lo ssl_expr_scan.lo
ssl_expr_parse.lo ssl_expr_eval.lo ssl_util.lo ssl_util_ssl.lo
ssl_util_sdbm.lo
ssl_util_table.lo  -lssl -lcrypto -L/usr/lib/gcc-lib/i386-redhat-linux/3.2 -
lgcc
<=== src/modules/ssl
===> src/modules/frontpage
make[4]: *** No rule to make target `all'.  Stop.
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory
`/usr/src/redhat/BUILD/NSApache/apache_1.3.28/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/NSApache/apache_1.3.28'
make: *** [build] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.17380 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.17380 (%build)
[root@dns SPECS]#


Does anyone now while i can find the source mod_frontpage for apache_1.3.28

Thanks

Sean








----- Original Message ----- 
From: "Sean Woodlock" <ad...@ciscohire.com>
To: <us...@httpd.apache.org>
Sent: Sunday, January 18, 2004 1:07 PM
Subject: [users@httpd] Help to hack Redhat .spec file


> I am trying to upgrade  my old web server running apache server from
redhat
> 6.2 apache 13.12  to   apache_1.3.28  php 4.3.4 mod_perl-1.28,
> mod_ssl-2.8.15-1.3.28, openssl-0.9.7c.  Aslo can anyone tell me what
version
> mod_frontpage is available to compile in as module.  I found one called
> fp50.linux.tar but is seems that need to be install from a script
>
> I have tried to hack the .spec, everything goes fine until it  to the
make.
> See below for the spec file and error message.  The error is produce by
> running config with the same args.
>
> Any advice would be very much apreciated
>
> ######################################################################
> #
> # SAApache
> #
> #
> # This is the spec file for the source RPM for the NSApache
> # package.  This package contains the Apache web server,
> # version 1.3.12, plus the following modules:
> #
> #       mod_frontpage VR4 4.0.4.3
> #       mod_perl 1.24
> #       mod_php 4.0.0
> #       mod_ssl 2.6.4 (and OpenSSL 0.9.5a)
> #       mod_rewrite (included with the Apache source)
> #
> ######################################################################
>
> #Version of SA1100/1120
> %define productversion 1.1
>
> ######################################################################
> # preamble
> ######################################################################
>
> Summary: The Apache web server and desired modules
> Name: SAApache
> Version: %{productversion}
> Release: 142
> Group: System/Base
> Vendor: Hewlett-Packard Company
> Packager: Hewlett-Packard Company
> #Source1: fp50.linux.tar
> #Source0: ftp://ftp.apache.org/apache/dist/apache_1.3.12.tar.gz
> #Source1:
ftp://ftp.vr.net/pub/apache/mod_frontpage/mod_frontpage-VR4.tar.gz
> #Source2: http://perl.apache.org/dist/mod_perl-1.24.tar.gz
> #Source3: http://www.php.net/distributions/php-4.0.0.tar.gz
> #Source4: http://www.openssl.org/source/openssl-0.9.5a.tar.gz
> #Source5: http://www.modssl.org/source/mod_ssl-2.6.4-1.3.12.tar.gz
> Source0: apache_1.3.28.tar.gz
> Source1: fp50.linux.tar             <<<<<<<<<<<<<<<<<<<<<<<<<<<This is not
> being used, without it the compiler stop straight away
> Source2: mod_perl-1.28.tar.tar
> Source3: php-4.3.4.tar.gz
> Source4: openssl-0.9.7c.tar.gz
> Source:5 mod_ssl-2.8.15-1.3.28.tar
> Source6: httpd-vhost.init
> Source7: apache.logrotate
> Source8: vh_httpd.conf
> Source9: apache-index.html
> Source10: mod_perl.config
> Source11: swshleft.gif
> Source12: swshmiddle.gif
> Source13: swshright.gif
> Source14: swshtop.gif
> Source15: title.jpg
>
>
>
>
>
> Copyright: mixed
> Requires: /etc/mime.types
> Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, mailcap, grep, textutils
> Provides: webserver
> BuildRoot: /tmp/NSApache
>
> %description
> Apache is a powerful, full-featured, efficient and freely-available
> Web server. Apache is also the most popular Web server on the
> Internet.
>
> Install the apache package if you need a Web server.
>
> ######################################################################
> # prep
> ######################################################################
>
> %prep
> %setup -T -q -c -n NSApache -a 0
> %setup -D -T -q -n NSApache/apache_1.3.28 -a 1
> %setup -D -T -q -c -n NSApache -a 2
> %setup -D -T -q -c -n NSApache -a 3
> %setup -D -T -q -c -n NSApache -a 4
> %setup -D -T -q -c -n NSApache -a 5
>
>
> ######################################################################
> # build
> ######################################################################
>
> %build
>
> # configure mod_perl
>
> cd mod_perl-1.28
> perl Makefile.PL USE_DSO=1 NO_HTTPD=1 USE_APACI=1
> APACHE_SRC=../apache_1.3.28/src
> cd ..
>
> # build php
>
> cd php-4.3.4
> ./configure --with-apache=../apache_1.3.28
> make
> make install-sapi
> cd ..
>
> # build openssl
>
> #cd openssl-0.9.7c
> #sh config
> #make
> #cd ..
>
> # configure mod_ssl
>
> cd mod_ssl-2.8.15-1.3.28
> ./configure --with-apache=../apache_1.3.28
> cd ..
>
> # i'm not sure why the mod_perl config doesn't
> # properly generate the mod_perl.config file, so
> # i'll copy it into place here.
> cp $RPM_SOURCE_DIR/mod_perl.config apache_1.3.28/src/modules/standard/
>
> # finally, build apache
>
> cd apache_1.3.28
> SSL_BASE=$RPM_BUILD_DIR/NSApache/openssl-0.9.7c \
>         ./configure \
>         --with-layout=NetStructure \
>         --enable-rule=SHARED_CORE \
>         --activate-module=src/modules/frontpage/mod_frontpage.o \ <<<<<<<i
> have made a frontpage dir in the apache.tar.gz
>         --enable-shared=frontpage \
>         --activate-module=src/modules/standard/mod_rewrite.o \
>         --enable-shared=rewrite \
>         --activate-module=src/modules/perl/libperl.a \   <<<<<<<i have
made
> a perl dir in the apache.tar.gz
>         --enable-shared=perl \
>         --activate-module=src/modules/php4/libphp4.a \
>         --enable-shared=php4 \
>         --enable-module=ssl \
>         --enable-shared=ssl \
>         --with-perl=/usr/bin/perl \
>         --enable-suexec \
>         --suexec-docroot=/home/httpd/html \
>         --suexec-caller=nobody
>
>
>
>
> make
>
> ######################################################################
> # install
> ######################################################################
>
> %install
> rm -rf $RPM_BUILD_ROOT
> cd apache_1.3.28
> make install root=$RPM_BUILD_ROOT
>
> # move the fpexec binary (front page) into place
> install -m4711
> $RPM_BUILD_DIR/NSApache/apache_1.3.28/src/modules/standard/fpexec \
>         $RPM_BUILD_ROOT/usr/sbin/fpexec
>
> # strip binary and so files.
> strip $RPM_BUILD_ROOT/usr/sbin/httpd
> strip $RPM_BUILD_ROOT/usr/ins/intel/apache/libexec/*.ep
> strip $RPM_BUILD_ROOT/usr/ins/intel/apache/libexec/*.so
>
> # install init script(s)
> mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
> install -m755 $RPM_SOURCE_DIR/httpd-vhost.init \
>         $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd
>
> for I in 0 1 2 6; do
>         mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc$I.d
>         ln -s ../init.d/httpd $RPM_BUILD_ROOT/etc/rc.d/rc$I.d/K15httpd
> done
> for I in 3 5; do
>         mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc$I.d
>         ln -s ../init.d/httpd $RPM_BUILD_ROOT/etc/rc.d/rc$I.d/S85httpd
> done
>
> # log rotation stuff
>
> mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
> install -m644 $RPM_SOURCE_DIR/apache.logrotate \
>         $RPM_BUILD_ROOT/etc/logrotate.d/apache
>
> ln -s ../../var/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
> ln -s ../../usr/lib/apache $RPM_BUILD_ROOT/etc/httpd/modules
>
> #Install NetStructure default page files
> install -m644 $RPM_SOURCE_DIR/apache-index.html \
>         $RPM_BUILD_ROOT/home/httpd/html/index.html
>
> install -m644 $RPM_SOURCE_DIR/swshleft.gif \
>         $RPM_BUILD_ROOT/home/httpd/html/swshleft.gif
>
> install -m644 $RPM_SOURCE_DIR/swshmiddle.gif \
>         $RPM_BUILD_ROOT/home/httpd/html/swshmiddle.gif
>
> install -m644 $RPM_SOURCE_DIR/swshright.gif \
>         $RPM_BUILD_ROOT/home/httpd/html/swshright.gif
>
> install -m644 $RPM_SOURCE_DIR/swshtop.gif \
>         $RPM_BUILD_ROOT/home/httpd/html/swshtop.gif
>
> install -m644 $RPM_SOURCE_DIR/title.jpg \
>         $RPM_BUILD_ROOT/home/httpd/html/title.jpg
>
> #install -m644 $RPM_SOURCE_DIR/poweredby.png \
> #        $RPM_BUILD_ROOT/home/httpd/html
>
> # default config files
>
> install -m644 $RPM_SOURCE_DIR/vh_httpd.conf \
>         $RPM_BUILD_ROOT/etc/httpd/conf/httpd.conf
>
> # create an empty placeholder /usr/lib/apache
> mkdir -p $RPM_BUILD_ROOT/usr/lib/apache
>
> ######################################################################
> # clean
> ######################################################################
>
> %clean
> rm -rf $RPM_BUILD_ROOT
>
> %pre
> if [ $1 != 1 ]; then
>    /etc/rc.d/init.d/httpd stop > /dev/null 2>&1
> fi
>
> ######################################################################
> # post
> ######################################################################
>
> %post
> /sbin/chkconfig --add httpd
> [ -f /etc/mime.types ] || exit 0
> # safely add .htm to mime types if it is not already there
> TEMPTYPES=`/bin/mktemp /tmp/mimetypes.XXXXXX`
> [ -z "$TEMPTYPES" ] && {
>   echo "could not make temporary file, htm not added to /etc/mime.types"
>&2
>   exit 1
> }
> ( grep -v "^text/html"  /etc/mime.types
>   types=$(grep "^text/html" /etc/mime.types | cut -f2-)
>   echo -en "text/html\t\t\t"
>   for val in $types ; do
>       if [ "$val" = "htm" ] ; then
>           continue
>       fi
>       echo -n "$val "
>   done
>   echo "htm"
> ) > $TEMPTYPES
> cat $TEMPTYPES > /etc/mime.types && /bin/rm -f $TEMPTYPES
> /etc/rc.d/init.d/httpd start > /dev/null 2>&1
>
>
> ######################################################################
> # preun
> ######################################################################
>
> %preun
> if [ $1 = 0 ]; then
>    /etc/rc.d/init.d/httpd stop > /dev/null 2>&1
>    /sbin/chkconfig --del httpd
> fi
>
> ######################################################################
> # files
> ######################################################################
>
> %files
> %defattr(-,root,root)
> %dir /etc/httpd/conf
> %config /etc/httpd/conf/access.conf
> %config /etc/httpd/conf/srm.conf
> %config /etc/httpd/conf/httpd.conf
> %config /etc/httpd/conf/magic
>
> /etc/httpd/logs
> /etc/httpd/modules
> %config /etc/logrotate.d/apache
> %config /etc/rc.d/init.d/httpd
> %config(missingok) /etc/rc.d/rc3.d/S85httpd
> %config(missingok) /etc/rc.d/rc5.d/S85httpd
> %config(missingok) /etc/rc.d/rc0.d/K15httpd
> %config(missingok) /etc/rc.d/rc1.d/K15httpd
> %config(missingok) /etc/rc.d/rc2.d/K15httpd
> %config(missingok) /etc/rc.d/rc6.d/K15httpd
>
> %dir /home/httpd
> %dir /home/httpd/cgi-bin
> %dir /home/httpd/html
> %config(noreplace) /home/httpd/html/index.html
> /home/httpd/html/swshleft.gif
> /home/httpd/html/swshmiddle.gif
> /home/httpd/html/swshright.gif
> /home/httpd/html/swshtop.gif
> /home/httpd/html/title.jpg
> #/home/httpd/html/poweredby.png
> /home/httpd/icons
>
> /usr/ins/intel/apache/libexec
> /usr/lib/apache
>
> /usr/man/man1/*
> /usr/man/man8/ab.8*
> /usr/man/man8/httpd.8*
> /usr/man/man8/logresolve.8*
> /usr/man/man8/rotatelogs.8*
> /usr/man/man8/suexec.8*
>
> /usr/sbin/ab
> /usr/sbin/httpd
> /usr/sbin/logresolve
> /usr/sbin/rotatelogs
> %attr(4711,root,root) /usr/sbin/suexec
> %attr(4711,root,root) /usr/sbin/fpexec
> %attr(-,nobody,nobody) %dir /var/cache/httpd
> %dir /var/log/httpd
>
>  Here is the error message i get also the same  if run on the commad line
>
> Now proceed with the following commands (Bourne-Shell syntax):
>  $ cd ../apache_1.3.28
>  $ SSL_BASE=/path/to/openssl ./configure ... --enable-module=ssl
>  $ make
>  $ make certificate
>  $ make install
> + cd ..
> + cp /usr/src/redhat/SOURCES/mod_perl.config
> apache_1.3.28/src/modules/standard/
> + cd apache_1.3.28
> + SSL_BASE=/usr/src/redhat/BUILD/NSApache/openssl-0.9.7c
> +
>
./configure --with-layout=NetStructure --enable-rule=SHARED_CORE --activate-
>
module=src/modules/frontpage/mod_frontpage.o --enable-shared=frontpage --act
>
ivate-module=src/modules/standard/mod_rewrite.o --enable-shared=rewrite --ac
>
tivate-module=src/modules/perl/libperl.a --enable-shared=perl --activate-mod
>
ule=src/modules/php4/libphp4.a --enable-shared=php4 --enable-module=ssl --en
>
able-shared=ssl --with-perl=/usr/bin/perl --enable-suexec --suexec-docroot=/
> home/httpd/html --suexec-caller=nobody
> Configuring for Apache, Version 1.3.28
>  + using installation path layout: NetStructure (config.layout)
>  + activated frontpage module (modules/frontpage/mod_frontpage.o)
>  + activated rewrite module (modules/standard/mod_rewrite.o)
>  + activated perl module (modules/perl/libperl.a)
>  + activated php4 module (modules/php4/libphp4.a)
> Creating Makefile
> Creating Configuration.apaci in src
>  + enabling mod_so for DSO support
> Error: Cannot find SSL binaries under
> /usr/src/redhat/BUILD/NSApache/openssl-0.9.7c
> Creating Makefile in src
>  + configured for Linux platform
>  + setting C compiler to gcc
>  + setting C pre-processor to gcc -E
>  + using "tr [a-z] [A-Z]" to uppercase
>  + checking for system header files
>  + adding selected modules
>     o rewrite_module uses ConfigStart/End
>  + using -lgdbm for DBM support
>       enabling DBM support for mod_rewrite
>     o ssl_module uses ConfigStart/End
>       + SSL interface: mod_ssl/2.8.15
>       + SSL interface build type: DSO
>       + SSL interface compatibility: enabled
>       + SSL interface experimental code: disabled
>       + SSL interface conservative code: disabled
>       + SSL interface vendor extensions: disabled
>       + SSL interface plugin: Built-in SDBM
>       + SSL library path: /usr/src/redhat/BUILD/NSApache/openssl-0.9.7c
> + make
> ===> src
> make[1]: Entering directory `/usr/src/redhat/BUILD/NSApache/apache_1.3.28'
> make[2]: Entering directory
> `/usr/src/redhat/BUILD/NSApache/apache_1.3.28/src'
> make[2]: *** No rule to make target `all'.  Stop.
> make[2]: Leaving directory
> `/usr/src/redhat/BUILD/NSApache/apache_1.3.28/src'
> make[1]: *** [build-std] Error 2
> make[1]: Leaving directory `/usr/src/redhat/BUILD/NSApache/apache_1.3.28'
> make: *** [build] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.25218 (%build)
>
>
> Sorry for the long post, but i need to give you as much info as possible
>
>
> Many Thanks for looking
>
> Sean
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Help to hack Redhat .spec file

Posted by Sean Woodlock <ad...@ciscohire.com>.
I am trying to upgrade  my old web server running apache server from redhat
6.2 apache 13.12  to   apache_1.3.28  php 4.3.4 mod_perl-1.28,
mod_ssl-2.8.15-1.3.28, openssl-0.9.7c.  Aslo can anyone tell me what version
mod_frontpage is available to compile in as module.  I found one called
fp50.linux.tar but is seems that need to be install from a script

I have tried to hack the .spec, everything goes fine until it  to the make.
See below for the spec file and error message.  The error is produce by
running config with the same args.

Any advice would be very much apreciated

######################################################################
#
# SAApache
#
#
# This is the spec file for the source RPM for the NSApache
# package.  This package contains the Apache web server,
# version 1.3.12, plus the following modules:
#
#       mod_frontpage VR4 4.0.4.3
#       mod_perl 1.24
#       mod_php 4.0.0
#       mod_ssl 2.6.4 (and OpenSSL 0.9.5a)
#       mod_rewrite (included with the Apache source)
#
######################################################################

#Version of SA1100/1120
%define productversion 1.1

######################################################################
# preamble
######################################################################

Summary: The Apache web server and desired modules
Name: SAApache
Version: %{productversion}
Release: 142
Group: System/Base
Vendor: Hewlett-Packard Company
Packager: Hewlett-Packard Company
#Source1: fp50.linux.tar
#Source0: ftp://ftp.apache.org/apache/dist/apache_1.3.12.tar.gz
#Source1: ftp://ftp.vr.net/pub/apache/mod_frontpage/mod_frontpage-VR4.tar.gz
#Source2: http://perl.apache.org/dist/mod_perl-1.24.tar.gz
#Source3: http://www.php.net/distributions/php-4.0.0.tar.gz
#Source4: http://www.openssl.org/source/openssl-0.9.5a.tar.gz
#Source5: http://www.modssl.org/source/mod_ssl-2.6.4-1.3.12.tar.gz
Source0: apache_1.3.28.tar.gz
Source1: fp50.linux.tar             <<<<<<<<<<<<<<<<<<<<<<<<<<<This is not
being used, without it the compiler stop straight away
Source2: mod_perl-1.28.tar.tar
Source3: php-4.3.4.tar.gz
Source4: openssl-0.9.7c.tar.gz
Source:5 mod_ssl-2.8.15-1.3.28.tar
Source6: httpd-vhost.init
Source7: apache.logrotate
Source8: vh_httpd.conf
Source9: apache-index.html
Source10: mod_perl.config
Source11: swshleft.gif
Source12: swshmiddle.gif
Source13: swshright.gif
Source14: swshtop.gif
Source15: title.jpg





Copyright: mixed
Requires: /etc/mime.types
Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, mailcap, grep, textutils
Provides: webserver
BuildRoot: /tmp/NSApache

%description
Apache is a powerful, full-featured, efficient and freely-available
Web server. Apache is also the most popular Web server on the
Internet.

Install the apache package if you need a Web server.

######################################################################
# prep
######################################################################

%prep
%setup -T -q -c -n NSApache -a 0
%setup -D -T -q -n NSApache/apache_1.3.28 -a 1
%setup -D -T -q -c -n NSApache -a 2
%setup -D -T -q -c -n NSApache -a 3
%setup -D -T -q -c -n NSApache -a 4
%setup -D -T -q -c -n NSApache -a 5


######################################################################
# build
######################################################################

%build

# configure mod_perl

cd mod_perl-1.28
perl Makefile.PL USE_DSO=1 NO_HTTPD=1 USE_APACI=1
APACHE_SRC=../apache_1.3.28/src
cd ..

# build php

cd php-4.3.4
./configure --with-apache=../apache_1.3.28
make
make install-sapi
cd ..

# build openssl

#cd openssl-0.9.7c
#sh config
#make
#cd ..

# configure mod_ssl

cd mod_ssl-2.8.15-1.3.28
./configure --with-apache=../apache_1.3.28
cd ..

# i'm not sure why the mod_perl config doesn't
# properly generate the mod_perl.config file, so
# i'll copy it into place here.
cp $RPM_SOURCE_DIR/mod_perl.config apache_1.3.28/src/modules/standard/

# finally, build apache

cd apache_1.3.28
SSL_BASE=$RPM_BUILD_DIR/NSApache/openssl-0.9.7c \
        ./configure \
        --with-layout=NetStructure \
        --enable-rule=SHARED_CORE \
        --activate-module=src/modules/frontpage/mod_frontpage.o \ <<<<<<<i
have made a frontpage dir in the apache.tar.gz
        --enable-shared=frontpage \
        --activate-module=src/modules/standard/mod_rewrite.o \
        --enable-shared=rewrite \
        --activate-module=src/modules/perl/libperl.a \   <<<<<<<i have made
a perl dir in the apache.tar.gz
        --enable-shared=perl \
        --activate-module=src/modules/php4/libphp4.a \
        --enable-shared=php4 \
        --enable-module=ssl \
        --enable-shared=ssl \
        --with-perl=/usr/bin/perl \
        --enable-suexec \
        --suexec-docroot=/home/httpd/html \
        --suexec-caller=nobody




make

######################################################################
# install
######################################################################

%install
rm -rf $RPM_BUILD_ROOT
cd apache_1.3.28
make install root=$RPM_BUILD_ROOT

# move the fpexec binary (front page) into place
install -m4711
$RPM_BUILD_DIR/NSApache/apache_1.3.28/src/modules/standard/fpexec \
        $RPM_BUILD_ROOT/usr/sbin/fpexec

# strip binary and so files.
strip $RPM_BUILD_ROOT/usr/sbin/httpd
strip $RPM_BUILD_ROOT/usr/ins/intel/apache/libexec/*.ep
strip $RPM_BUILD_ROOT/usr/ins/intel/apache/libexec/*.so

# install init script(s)
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m755 $RPM_SOURCE_DIR/httpd-vhost.init \
        $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd

for I in 0 1 2 6; do
        mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc$I.d
        ln -s ../init.d/httpd $RPM_BUILD_ROOT/etc/rc.d/rc$I.d/K15httpd
done
for I in 3 5; do
        mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc$I.d
        ln -s ../init.d/httpd $RPM_BUILD_ROOT/etc/rc.d/rc$I.d/S85httpd
done

# log rotation stuff

mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m644 $RPM_SOURCE_DIR/apache.logrotate \
        $RPM_BUILD_ROOT/etc/logrotate.d/apache

ln -s ../../var/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
ln -s ../../usr/lib/apache $RPM_BUILD_ROOT/etc/httpd/modules

#Install NetStructure default page files
install -m644 $RPM_SOURCE_DIR/apache-index.html \
        $RPM_BUILD_ROOT/home/httpd/html/index.html

install -m644 $RPM_SOURCE_DIR/swshleft.gif \
        $RPM_BUILD_ROOT/home/httpd/html/swshleft.gif

install -m644 $RPM_SOURCE_DIR/swshmiddle.gif \
        $RPM_BUILD_ROOT/home/httpd/html/swshmiddle.gif

install -m644 $RPM_SOURCE_DIR/swshright.gif \
        $RPM_BUILD_ROOT/home/httpd/html/swshright.gif

install -m644 $RPM_SOURCE_DIR/swshtop.gif \
        $RPM_BUILD_ROOT/home/httpd/html/swshtop.gif

install -m644 $RPM_SOURCE_DIR/title.jpg \
        $RPM_BUILD_ROOT/home/httpd/html/title.jpg

#install -m644 $RPM_SOURCE_DIR/poweredby.png \
#        $RPM_BUILD_ROOT/home/httpd/html

# default config files

install -m644 $RPM_SOURCE_DIR/vh_httpd.conf \
        $RPM_BUILD_ROOT/etc/httpd/conf/httpd.conf

# create an empty placeholder /usr/lib/apache
mkdir -p $RPM_BUILD_ROOT/usr/lib/apache

######################################################################
# clean
######################################################################

%clean
rm -rf $RPM_BUILD_ROOT

%pre
if [ $1 != 1 ]; then
   /etc/rc.d/init.d/httpd stop > /dev/null 2>&1
fi

######################################################################
# post
######################################################################

%post
/sbin/chkconfig --add httpd
[ -f /etc/mime.types ] || exit 0
# safely add .htm to mime types if it is not already there
TEMPTYPES=`/bin/mktemp /tmp/mimetypes.XXXXXX`
[ -z "$TEMPTYPES" ] && {
  echo "could not make temporary file, htm not added to /etc/mime.types" >&2
  exit 1
}
( grep -v "^text/html"  /etc/mime.types
  types=$(grep "^text/html" /etc/mime.types | cut -f2-)
  echo -en "text/html\t\t\t"
  for val in $types ; do
      if [ "$val" = "htm" ] ; then
          continue
      fi
      echo -n "$val "
  done
  echo "htm"
) > $TEMPTYPES
cat $TEMPTYPES > /etc/mime.types && /bin/rm -f $TEMPTYPES
/etc/rc.d/init.d/httpd start > /dev/null 2>&1


######################################################################
# preun
######################################################################

%preun
if [ $1 = 0 ]; then
   /etc/rc.d/init.d/httpd stop > /dev/null 2>&1
   /sbin/chkconfig --del httpd
fi

######################################################################
# files
######################################################################

%files
%defattr(-,root,root)
%dir /etc/httpd/conf
%config /etc/httpd/conf/access.conf
%config /etc/httpd/conf/srm.conf
%config /etc/httpd/conf/httpd.conf
%config /etc/httpd/conf/magic

/etc/httpd/logs
/etc/httpd/modules
%config /etc/logrotate.d/apache
%config /etc/rc.d/init.d/httpd
%config(missingok) /etc/rc.d/rc3.d/S85httpd
%config(missingok) /etc/rc.d/rc5.d/S85httpd
%config(missingok) /etc/rc.d/rc0.d/K15httpd
%config(missingok) /etc/rc.d/rc1.d/K15httpd
%config(missingok) /etc/rc.d/rc2.d/K15httpd
%config(missingok) /etc/rc.d/rc6.d/K15httpd

%dir /home/httpd
%dir /home/httpd/cgi-bin
%dir /home/httpd/html
%config(noreplace) /home/httpd/html/index.html
/home/httpd/html/swshleft.gif
/home/httpd/html/swshmiddle.gif
/home/httpd/html/swshright.gif
/home/httpd/html/swshtop.gif
/home/httpd/html/title.jpg
#/home/httpd/html/poweredby.png
/home/httpd/icons

/usr/ins/intel/apache/libexec
/usr/lib/apache

/usr/man/man1/*
/usr/man/man8/ab.8*
/usr/man/man8/httpd.8*
/usr/man/man8/logresolve.8*
/usr/man/man8/rotatelogs.8*
/usr/man/man8/suexec.8*

/usr/sbin/ab
/usr/sbin/httpd
/usr/sbin/logresolve
/usr/sbin/rotatelogs
%attr(4711,root,root) /usr/sbin/suexec
%attr(4711,root,root) /usr/sbin/fpexec
%attr(-,nobody,nobody) %dir /var/cache/httpd
%dir /var/log/httpd

 Here is the error message i get also the same  if run on the commad line

Now proceed with the following commands (Bourne-Shell syntax):
 $ cd ../apache_1.3.28
 $ SSL_BASE=/path/to/openssl ./configure ... --enable-module=ssl
 $ make
 $ make certificate
 $ make install
+ cd ..
+ cp /usr/src/redhat/SOURCES/mod_perl.config
apache_1.3.28/src/modules/standard/
+ cd apache_1.3.28
+ SSL_BASE=/usr/src/redhat/BUILD/NSApache/openssl-0.9.7c
+
./configure --with-layout=NetStructure --enable-rule=SHARED_CORE --activate-
module=src/modules/frontpage/mod_frontpage.o --enable-shared=frontpage --act
ivate-module=src/modules/standard/mod_rewrite.o --enable-shared=rewrite --ac
tivate-module=src/modules/perl/libperl.a --enable-shared=perl --activate-mod
ule=src/modules/php4/libphp4.a --enable-shared=php4 --enable-module=ssl --en
able-shared=ssl --with-perl=/usr/bin/perl --enable-suexec --suexec-docroot=/
home/httpd/html --suexec-caller=nobody
Configuring for Apache, Version 1.3.28
 + using installation path layout: NetStructure (config.layout)
 + activated frontpage module (modules/frontpage/mod_frontpage.o)
 + activated rewrite module (modules/standard/mod_rewrite.o)
 + activated perl module (modules/perl/libperl.a)
 + activated php4 module (modules/php4/libphp4.a)
Creating Makefile
Creating Configuration.apaci in src
 + enabling mod_so for DSO support
Error: Cannot find SSL binaries under
/usr/src/redhat/BUILD/NSApache/openssl-0.9.7c
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + using "tr [a-z] [A-Z]" to uppercase
 + checking for system header files
 + adding selected modules
    o rewrite_module uses ConfigStart/End
 + using -lgdbm for DBM support
      enabling DBM support for mod_rewrite
    o ssl_module uses ConfigStart/End
      + SSL interface: mod_ssl/2.8.15
      + SSL interface build type: DSO
      + SSL interface compatibility: enabled
      + SSL interface experimental code: disabled
      + SSL interface conservative code: disabled
      + SSL interface vendor extensions: disabled
      + SSL interface plugin: Built-in SDBM
      + SSL library path: /usr/src/redhat/BUILD/NSApache/openssl-0.9.7c
+ make
===> src
make[1]: Entering directory `/usr/src/redhat/BUILD/NSApache/apache_1.3.28'
make[2]: Entering directory
`/usr/src/redhat/BUILD/NSApache/apache_1.3.28/src'
make[2]: *** No rule to make target `all'.  Stop.
make[2]: Leaving directory
`/usr/src/redhat/BUILD/NSApache/apache_1.3.28/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/NSApache/apache_1.3.28'
make: *** [build] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.25218 (%build)


Sorry for the long post, but i need to give you as much info as possible


Many Thanks for looking

Sean







---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access Forbidden! (One other thing...)

Posted by Paul Laudanski <la...@yahoo.com>.
You are welcome, hope they help.
--- David Blomstrom <da...@yahoo.com> wrote:
> OK, thanks for the tips!


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access Forbidden! (One other thing...)

Posted by David Blomstrom <da...@yahoo.com>.
OK, thanks for the tips!

--- Paul Laudanski <la...@yahoo.com> wrote:
> When you go into your server, change directories to
> the location of the files you can no longer access
> via
> your browser.  Run this:
> 
> ls -lart
> 
> It'll show you the permissions on the files and
> ownership.
> 
> Paul
> --- David Blomstrom <da...@yahoo.com>
> wrote:
> > One other thing I forgot to mention is that the
> > JavaScript style sheet changer links were working
> > just
> > fine - until everything suddenly went dead, just a
> > few
> > weeks ago. I guess that kind points away from
> > Apache,
> > but I wasn't sure where to begin.
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> > Sweepstakes
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > 
> >
>
---------------------------------------------------------------------
> > The official User-To-User support forum of the
> > Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html>
> for
> > more info.
> > To unsubscribe, e-mail:
> > users-unsubscribe@httpd.apache.org
> >    "   from the digest:
> > users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail:
> > users-help@httpd.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access Forbidden! (One other thing...)

Posted by Paul Laudanski <la...@yahoo.com>.
When you go into your server, change directories to
the location of the files you can no longer access via
your browser.  Run this:

ls -lart

It'll show you the permissions on the files and
ownership.

Paul
--- David Blomstrom <da...@yahoo.com> wrote:
> One other thing I forgot to mention is that the
> JavaScript style sheet changer links were working
> just
> fine - until everything suddenly went dead, just a
> few
> weeks ago. I guess that kind points away from
> Apache,
> but I wasn't sure where to begin.
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access Forbidden! (One other thing...)

Posted by David Blomstrom <da...@yahoo.com>.
One other thing I forgot to mention is that the
JavaScript style sheet changer links were working just
fine - until everything suddenly went dead, just a few
weeks ago. I guess that kind points away from Apache,
but I wasn't sure where to begin.

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access Forbidden! (Is this an Apache error?)

Posted by David Blomstrom <da...@yahoo.com>.
--- Paul Laudanski <la...@yahoo.com> wrote:

"Hello David, I see this problem a lot in my support
of PHP-Nuke portals.  There are a couple of things
that
come to mind:

"Check your user/group ownership of the
file/directory and ensure that the user apache runs
under has access to the file (this includes the
permissions on the file as well ie: rwx)."

Thanks for the tip. I think I understand what you're
saying, though this is all very new to me. I'm
especially in the dark regarding user/group ownership
and permissions, an I've never had to deal with that;
my websites are all on my computer, which isn't shared
by anyone else. (However, I have published this page
onlne, and it isn't working there, either.)

Anyway, I'll have to find a tutorial to help me figure
how to check my user/group ownership (of the folder my
websites are in, or the folder Apache is in).

Can you suggest a topic heading or keywords to search
for? I browsed through the main Apache 2.0 page at
http://httpd.apache.org/docs-2.0/ and the FAQs but
didn't see anything that looked relevant.

Thanks!


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access Forbidden! (Is this an Apache error?)

Posted by Paul Laudanski <la...@yahoo.com>.
Hello David, I see this problem a lot in my support of
PHP-Nuke portals.  There are a couple of things that
come to mind:

Check your user/group ownership of the file/directory
and ensure that the user apache runs under has access
to the file (this includes the permissions on the file
as well ie: rwx).

Paul
--- David Blomstrom <da...@yahoo.com> wrote:
> I've got a really bizarre problem that's tough to
> troubleshoot, because I don't have a clue what's
> causing it.
> 
> I have some suspicions it might be linked to Apache,
> based on the fact that I only recently installed
> Apache, PHP and MySQL and the following error
> message:
> 
> Access forbidden!
> 

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org