Results 1 to 25 of 25
Thread: httpd.conf question
-
05-28-2005, 05:39 AM #1Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
httpd.conf question
Hello,
Is it possible to tell the httpd.conf for a particular site when it streams a html file it would add something to the top of the code?
Like
<Directory /home/.sites/143/site2/web>
AllowOverride All
Options All
Action text/html "include something"
</Directory>
Thanks for the advice-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 10:13 AM #2Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Maybe you could use mod_layout for this and use it only for header wrap?
Syntax example here:
http://www.fnal.gov/docs/products/mod_layout/
(it inserts a footer but enough to illustrate, I believe)
Directives here:
http://www.fnal.gov/docs/products/mo.../faq.html#_1_9
I think this could fit your purpose nicely.
-
05-28-2005, 10:24 AM #3Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
yes, but I am having problems installing and activating mod_layout...
-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 11:34 AM #4Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Hm... what kind of problems? Does it get past the configure and make or do you get the problems there?
-
05-28-2005, 11:39 AM #5Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
When trying the rpms, it doesn't seem to ahve any for version 2.0.52 on RH9
And so I tried to do a makefile myself but then there is no special.mk to continue.... I uncommented the line and then I got
apxs -c mod_layout.c utility.c layout.c
apxs:Error: /usr/bin/apr-config not found!.
make: *** [mod_layout.so] Error 1
When searching in the server i founf the mod_layout.so in the modules folder and tried to add it to the httpd.conf but the webserver starts with a problem
Starting httpd: httpd: module "mod_layout.c" is not compatible with this version of Apache (found 20020628, need 20020903).
Please contact the vendor for the correct version.-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 11:41 AM #6Problem Solver
- Join Date
- Mar 2003
- Location
- California USA
- Posts
- 13,681
It looks like you are using ensim. Becare what you play with. You could easily cause alot of problems
Steven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance
-
05-28-2005, 11:51 AM #7Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
I am actually running RH9 under the BlueQuartz with Apache 2.0.52
Would that be difficult to load the mod_layout.so module?-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 12:11 PM #8Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Have you tried compiling the mod_layout 4.01 from the Apache 2.x specific source?
http://tangent.org/index.pl?lastnode_id=362&node_id=374
The install procedure is pretty simple and this should work no problem.
Note: In INSTALL you are instructed to add Apache 2.0 to your $PATH:
First, make sure Apache 2.0 is in your path (probably means adding /usr/local/apache2/bin to your PATH).
Then edit the Makefile using vi, pico, nano whatever you use, save it and try again.
There are several paths in Makefile which you can adjust this to fit your specific configuration (that's one of the advantages of compiling from src - you can edit files):
top_srcdir=/usr/local/apache2
top_builddir=/usr/local/apache2
include /usr/local/apache2/build/special.mk
# the used tools
APXS=/usr/local/apache2/bin/apxsLast edited by SupaDucta; 05-28-2005 at 12:19 PM.
-
05-28-2005, 12:15 PM #9Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
Yes I tried but where am I going to get a special.mk file??
-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 12:22 PM #10Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Login to shell and type:
locate special.mk
it will echo the path to few of them - use the one begginning with /usr/local, and type it here or edit the makefile paths.
-
05-28-2005, 12:31 PM #11Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
Ah getting somewhere
/usr/sbin/apxs -c mod_layout.c utility.c layout.c
apxs:Error: /usr/bin/apr-config not found!.
make: *** [mod_layout.so] Error 1-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 12:35 PM #12Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Where is your Apache?
/usr/local/apache ?
If it is, edit those paths in Makefile to be:
top_srcdir=/usr/local/apache
top_builddir=/usr/local/apache
include /usr/local/apache/build/special.mk
# the used tools
APXS=/usr/local/apache/bin/apxs
and try again.
-
05-28-2005, 12:37 PM #13Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
Here are my variables
builddir=$(shell pwd)
top_srcdir=/usr/lib/httpd
top_builddir=/usr/lib/httpd
include /usr/lib/httpd/build/special.mk
# the used tools
APXS=/usr/sbin/apxs-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 12:42 PM #14Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Wrong.
Where is your Apache server root ?
Is it in /usr/local/apache?
-
05-28-2005, 12:46 PM #15Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Please paste me the output of:
locate special.mk
-
05-28-2005, 12:48 PM #16Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
The output is
/usr/lib/httpd/build/special.mk-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 12:51 PM #17Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
That's it?
Try:
cd /
updatedb
locate special.mk
Should echo something like:
/usr/local/apache/build/special.mk
/usr/lib/httpd/build/special.mk
/usr/src/redhat/BUILD/httpd-2.0.52/build/special.mk
-
05-28-2005, 12:56 PM #18Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
Still the same.
My conf files are at
/etc/httpd/conf-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 01:03 PM #19Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
I got it to install!!!
Needed the apr-0.9.5-0.2.i386.rpm
But then it stalls on the "make install"
make[1]: Entering directory `/home/workbin/mod_layout4'
/bin/sh: line 1: /usr/lib/httpd: is a directory
make[1]: *** [install-modules] Error 126
make[1]: Leaving directory `/home/workbin/mod_layout4'
make: *** [install-recursive] Error 1-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 01:10 PM #20Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Hmmm... try the following:
First locate apr-config and copy it to /usr/bin.
cp OLDPATH/apr-config /usr/bin
Then do a ls -al /usr/bin/apr-config see if it has the following attributes:
-rwxr-xr-x
Then try running mod_layout make again.
-
05-28-2005, 01:16 PM #21Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
Originally posted by SupaDucta
Hmmm... try the following:
First locate apr-config and copy it to /usr/bin.
cp OLDPATH/apr-config /usr/bin
Then do a ls -al /usr/bin/apr-config see if it has the following attributes:
-rwxr-xr-x
Then try running mod_layout make again.
After installing the APR tools it could do the make and here are the values
/usr/sbin/apxs -c mod_layout.c utility.c layout.c
/usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -march=i386 -mcpu=i686 -I/usr/kerberos/include -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/apr-0 -c -o mod_layout.lo mod_layout.c && touch mod_layout.slo
/usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -march=i386 -mcpu=i686 -I/usr/kerberos/include -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/apr-0 -c -o utility.lo utility.c && touch utility.slo
/usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -march=i386 -mcpu=i686 -I/usr/kerberos/include -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/apr-0 -c -o layout.lo layout.c && touch layout.slo
/usr/lib/apr/build/libtool --silent --mode=link gcc -o mod_layout.la -rpath /usr/lib/httpd/modules -module -avoid-version layout.lo utility.lo mod_layout.lo
I tried to do a make install directly after a "make" and also tried a make clean first, but then both failed to install...-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 01:18 PM #22Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
Wait.... it worked
I don't know what.... but then it installed and apache booted with no problems!!
now to test the variables
thank you so much for your patience-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 01:22 PM #23Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Take a look at Apache's error_log to see if there are any boot errors.
When you do configurations in httpd.conf, before restarting Apache, do:
apachectl configtest
It will echo if the syntax is right or wrong
To config mod_layout use the links I have pasted in the beginning.
-
05-28-2005, 01:30 PM #24Web Hosting Master
- Join Date
- Jan 2004
- Location
- Singapore
- Posts
- 1,032
Yes the syntax is ok, just that BlueQuartz seem to be unable to set the virtualhost port correctly, but its just some error messages nothing much goes wrong in the user end
Thanks again-=- GQ Hong -=-
GalacNet WebMaster
-
05-28-2005, 02:58 PM #25Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
No problem, glad you got it to work. I believe you will be able to make some workaround around this BlueQuartz limitation.