You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users-de@httpd.apache.org by Nicole Haehnel <Ni...@epost.de> on 2002/12/05 21:13:03 UTC

Apache 2.0.43 mod_proxy kein Caching

Hallo,

ich habe den aktuellsten Apache selber mit allen Modulen kompiliert und einen Reverse-Proxy eingerichtet.
Soweit funktioniert das auch wunderbar, nur benutzt er den Cache nicht.
Ich habe CacheRoot und die anderen Einstellungen die für den Cache notwendig sind in der Config eingetragen.

CacheRoot /var/proxy
CacheDirLevels 5
CacheSize 50000
CacheGcInterval 12
CacheMaxExpire 24
CacheLastModifiedFactor 0.3
CacheDefaultExpire 1


Aber er cached einfach nichts!

Kann mir jemand helfen?



Vielen Dank!

Gruß
Nicole

RE: Apache 2.0.43 mod_proxy - er cacht!

Posted by Patrick Schulz <pa...@wolf-digital-solutions.com>.
In den artikeln findet man dann wirklich alles, wenn es darum geht den
tomcat mit apache zusammen zu betreiben?
Dh. standardmäßig apache (httpd) und bei bedarf dann tomcat hinzu
nehmen?
Oder sind die Artikel nur auf die Cookies usw. bezogen?
Ich mache mit dieser Sache jetzt schon seit zwei Wochen herum und komme
zu keinem Ergebnis.
Wenn Du eine Lösung weißt, für die man nur die Konfiguration des Apache
oder evtl auch des Tomcat verändern muß ohne die Appliaktion auf dem
Tomcat zu ändern, dann sag bitte wie.


Grüße 
Patrick


-----Original Message-----
From: i.t [mailto:i.t@ithum.de] 
Sent: Friday, December 06, 2002 3:07 PM
To: users-de@httpd.apache.org; Patrick Schulz
Subject: Re: Apache 2.0.43 mod_proxy - er cacht!


msg Freitag, 6. Dezember 2002 13:51 by Patrick Schulz:
> Tomcat Session expired.
> Kann das daran liegen, daß ich kein Caching aktiviert habe oder so?

nee - das mit den cookies ist ein Problem fuer sich. 2 Artikel von mir 
erscheinen demnaechst zum Thema Secure Reverse Proxy; einer in Englisch
im 
PHP magazine (1. eenglischsprachige Ausgabe des PHP-Magazins etwa 3. 
Dezemberwoche) und in LE02/03 (ausfuehrlich in dt. etwa ab 10.1.03)

Gruss
-- 
 . ___
 |  |  Irmund     Thum
 |  |   


------------------------------------------------------------------------
--
                Apache HTTP Server Mailing List "users-de" 
      unsubscribe-Anfragen an users-de-unsubscribe@httpd.apache.org
           sonstige Anfragen an users-de-help@httpd.apache.org
------------------------------------------------------------------------
--


Re: Apache 2.0.43 mod_proxy - er cacht!

Posted by "i.t" <i....@ithum.de>.
msg Freitag, 6. Dezember 2002 13:51 by Patrick Schulz:
> Tomcat Session expired.
> Kann das daran liegen, daß ich kein Caching aktiviert habe oder so?

nee - das mit den cookies ist ein Problem fuer sich. 2 Artikel von mir 
erscheinen demnaechst zum Thema Secure Reverse Proxy; einer in Englisch im 
PHP magazine (1. eenglischsprachige Ausgabe des PHP-Magazins etwa 3. 
Dezemberwoche) und in LE02/03 (ausfuehrlich in dt. etwa ab 10.1.03)

Gruss
-- 
 . ___
 |  |  Irmund     Thum
 |  |   


RE: Apache 2.0.43 mod_proxy - er cacht!

Posted by Patrick Schulz <pa...@wolf-digital-solutions.com>.
Hi,

das mod_proxy wird doch auf dafür verwendet um virtuelle Verzeichnisse
anzulegen, die auf einen anderen Server usw. zeigen.
z.B. (so schaut's bei mir aus):
<IfModule mod_proxy.c>
ProxyPass /app/ http://server:8080/Application
ProxyPassReverse /app/ http://server:8080/Application
</IfModule>
(mehr nicht)
Um das Geheimnis zu lüften, auf dem Port 8080 des Servers läuft ein
Tomcat 4.1.12.
Hier werden Servlets und JSPs ausgeführt.
Wenn ich jetzt http://myserver/app/ aufrufen und mich so zwei Seiten in
der Applikation weiter klicke, dann kommt eine Serverfehlermeldung von
Tomcat Session expired.
Kann das daran liegen, daß ich kein Caching aktiviert habe oder so?
Spreche ich den Tomcat direkt an, läuft das. 
Der Aufruf über myserver/app läuft allerdings einwandfrei auf einem
Nicht-Windows-System (getestet auf Mac).

Hat jemand einen Rat?
Ist allerdings kein Apache 2.0.43 sondern noch der 1.3.19 

Merci und Gruß
Patrick

-----Original Message-----
From: nicole.haehnel@epost.de [mailto:nicole.haehnel@epost.de] 
Sent: Friday, December 06, 2002 11:56 AM
To: users-de@httpd.apache.org; users-de@httpd.apache.org
Subject: Re: Apache 2.0.43 mod_proxy - er cacht!



Hi,

ich habe meinen Apache nochmal compiliert sow ei Du. Jetzt geht der
Cache, allerdings hat es einen Nachteil. Es ist viel langsamer als ohne
den Reverse-Proxy. Eigentlich sollte das doch mit Cache schneller
gehen!? Ich muss mich da wohl noch etwas in die ganzen Befehle vom Cache
einlesen...


Vielen Dank!

Nicole



-- Original Nachricht --

>so - jetzt macht er's:
>
>bin/apachectl start
>[root@2002 apache2]# ls -alrt proxy/
>insgesamt 12
>drwxr-xr-x   16 root     root         4096 Dez  6 09:05 ../
>drwx------    3 nobody   4294967295     4096 Dez  6 09:43 cw/
>drwxr-xr-x    3 nobody   nobody       4096 Dez  6 09:43 ./
>[root@2002 apache2]# ls -alrt proxy/cw/
>insgesamt 12
>drwx------    3 nobody   4294967295     4096 Dez  6 09:43 p8/
>drwxr-xr-x    3 nobody   nobody       4096 Dez  6 09:43 ../
>drwx------    3 nobody   4294967295     4096 Dez  6 09:43 ./
>
>jetzt muss ich nur noch nachvollziehen, was ich da gerade alles gemacht
habe:
>also
>#CacheGcInterval 12
>kommentiert, da derzeit noch nicht implementiert -
>aber wahrscheinlich war das Entscheidende das Unterverzeichnis proxy 
>mit chown -R nobody.nobody proxy/ auf den user des Webservers zu 
>setzen!
>
>Ganz unten meine config.nice und die Apache-Konfiguration. Sag mir 
>bitte
>
>Bescheid, ob Du es hinbekommen hast.
>
>  Gruß
> i.t
>
>--
> . ___
> |  |  Irmund     Thum
> |  |  +49 6374 992541
>       +49 173 7405882
>***
>cat ../httpd-2.0.43/config.nice
>#! /bin/sh
>#
># Created by configure
>
>"./configure" \
>"--enable-modules=all" \
>"--enable-so" \
>"--enable-mods-shared=max" \
>"--enable-ssl" \
>"--disable-mod_userdir" \
>"--enable-file-cache" \
>"--enable-cache" \
>"--enable-disk-cache" \
>"--enable-mem-cache" \
>"--enable-proxy" \
>"--enable-proxy-connect" \
>"--enable-proxy-ftp" \
>"--enable-proxy-http" \
>"--enable-rewrite" \
>"$@"
>
>*** httpd.conf ***
><IfModule mod_proxy.c>
>ProxyRequests On
>
><Proxy *>
>    Order deny,allow
>    Deny from all
>    Allow from all
></Proxy>
># allow from all IST natuerlich nicht das wahre :-
># Enable/disable the handling of HTTP/1.1 "Via:" headers.
># ("Full" adds the server version; "Block" removes all outgoing Via: 
>headers) # Set to one of: Off | On | Full | Block #
>ProxyVia On
>
>#
># To enable the cache as well, edit and uncomment the following lines: 
># (no cacheing without CacheRoot) #
>CacheRoot "/usr/local/apache2/proxy"
>CacheEnable disk /
>CacheSize 5
>#CacheGcInterval 4
>CacheMaxExpire 24
>CacheLastModifiedFactor 0.1
>CacheDefaultExpire 1
>#NoCache a-domain.com another-domain.edu joes.garage-sale.com
>
></IfModule>
># End of proxy directives
>
>-----------------------------------------------------------------------
---
>                Apache HTTP Server Mailing List "users-de" 
>      unsubscribe-Anfragen an users-de-unsubscribe@httpd.apache.org
>           sonstige Anfragen an users-de-help@httpd.apache.org
>-----------------------------------------------------------------------
>---
>
>







________________________________________
Abos online bestellen. Oder Leser werben und Prämie aussuchen.
http://www.epost.de/aboservice



------------------------------------------------------------------------
--
                Apache HTTP Server Mailing List "users-de" 
      unsubscribe-Anfragen an users-de-unsubscribe@httpd.apache.org
           sonstige Anfragen an users-de-help@httpd.apache.org
------------------------------------------------------------------------
--


Re: Apache 2.0.43 mod_proxy - er cacht!

Posted by ni...@epost.de.
Hi,

ich habe meinen Apache nochmal compiliert sow ei Du. Jetzt geht der Cache,
allerdings hat es einen Nachteil.
Es ist viel langsamer als ohne den Reverse-Proxy.
Eigentlich sollte das doch mit Cache schneller gehen!?
Ich muss mich da wohl noch etwas in die ganzen Befehle vom Cache einlesen...


Vielen Dank!

Nicole



-- Original Nachricht --

>so - jetzt macht er's:
>
>bin/apachectl start
>[root@2002 apache2]# ls -alrt proxy/
>insgesamt 12
>drwxr-xr-x   16 root     root         4096 Dez  6 09:05 ../
>drwx------    3 nobody   4294967295     4096 Dez  6 09:43 cw/
>drwxr-xr-x    3 nobody   nobody       4096 Dez  6 09:43 ./
>[root@2002 apache2]# ls -alrt proxy/cw/
>insgesamt 12
>drwx------    3 nobody   4294967295     4096 Dez  6 09:43 p8/
>drwxr-xr-x    3 nobody   nobody       4096 Dez  6 09:43 ../
>drwx------    3 nobody   4294967295     4096 Dez  6 09:43 ./
>
>jetzt muss ich nur noch nachvollziehen, was ich da gerade alles gemacht
habe:
>also
>#CacheGcInterval 12
>kommentiert, da derzeit noch nicht implementiert -
>aber wahrscheinlich war das Entscheidende das Unterverzeichnis proxy mit
>chown -R nobody.nobody proxy/
>auf den user des Webservers zu setzen!
>
>Ganz unten meine config.nice und die Apache-Konfiguration. Sag mir bitte
>
>Bescheid, ob Du es hinbekommen hast.
>
>  Gruß
> i.t
>
>-- 
> . ___
> |  |  Irmund     Thum
> |  |  +49 6374 992541 
>       +49 173 7405882
>***
>cat ../httpd-2.0.43/config.nice
>#! /bin/sh
>#
># Created by configure
>
>"./configure" \
>"--enable-modules=all" \
>"--enable-so" \
>"--enable-mods-shared=max" \
>"--enable-ssl" \
>"--disable-mod_userdir" \
>"--enable-file-cache" \
>"--enable-cache" \
>"--enable-disk-cache" \
>"--enable-mem-cache" \
>"--enable-proxy" \
>"--enable-proxy-connect" \
>"--enable-proxy-ftp" \
>"--enable-proxy-http" \
>"--enable-rewrite" \
>"$@"
>
>*** httpd.conf ***
><IfModule mod_proxy.c>
>ProxyRequests On
>
><Proxy *>
>    Order deny,allow
>    Deny from all
>    Allow from all
></Proxy>
># allow from all IST natuerlich nicht das wahre :-
># Enable/disable the handling of HTTP/1.1 "Via:" headers.
># ("Full" adds the server version; "Block" removes all outgoing Via: headers)
># Set to one of: Off | On | Full | Block
>#
>ProxyVia On
>
>#
># To enable the cache as well, edit and uncomment the following lines:
># (no cacheing without CacheRoot)
>#
>CacheRoot "/usr/local/apache2/proxy"
>CacheEnable disk /
>CacheSize 5
>#CacheGcInterval 4
>CacheMaxExpire 24
>CacheLastModifiedFactor 0.1
>CacheDefaultExpire 1
>#NoCache a-domain.com another-domain.edu joes.garage-sale.com
>
></IfModule>
># End of proxy directives
>
>--------------------------------------------------------------------------
>                Apache HTTP Server Mailing List "users-de" 
>      unsubscribe-Anfragen an users-de-unsubscribe@httpd.apache.org
>           sonstige Anfragen an users-de-help@httpd.apache.org
>--------------------------------------------------------------------------
>
>







________________________________________
Abos online bestellen. Oder Leser werben und Prämie aussuchen. http://www.epost.de/aboservice



Re: Apache 2.0.43 mod_proxy - er cacht!

Posted by "i.t" <i....@ithum.de>.
so - jetzt macht er's:

bin/apachectl start
[root@2002 apache2]# ls -alrt proxy/
insgesamt 12
drwxr-xr-x   16 root     root         4096 Dez  6 09:05 ../
drwx------    3 nobody   4294967295     4096 Dez  6 09:43 cw/
drwxr-xr-x    3 nobody   nobody       4096 Dez  6 09:43 ./
[root@2002 apache2]# ls -alrt proxy/cw/
insgesamt 12
drwx------    3 nobody   4294967295     4096 Dez  6 09:43 p8/
drwxr-xr-x    3 nobody   nobody       4096 Dez  6 09:43 ../
drwx------    3 nobody   4294967295     4096 Dez  6 09:43 ./

jetzt muss ich nur noch nachvollziehen, was ich da gerade alles gemacht habe:
also
#CacheGcInterval 12
kommentiert, da derzeit noch nicht implementiert -
aber wahrscheinlich war das Entscheidende das Unterverzeichnis proxy mit
chown -R nobody.nobody proxy/
auf den user des Webservers zu setzen!

Ganz unten meine config.nice und die Apache-Konfiguration. Sag mir bitte 
Bescheid, ob Du es hinbekommen hast.

  Gruß
 i.t

-- 
 . ___
 |  |  Irmund     Thum
 |  |  +49 6374 992541 
       +49 173 7405882
***
cat ../httpd-2.0.43/config.nice
#! /bin/sh
#
# Created by configure

"./configure" \
"--enable-modules=all" \
"--enable-so" \
"--enable-mods-shared=max" \
"--enable-ssl" \
"--disable-mod_userdir" \
"--enable-file-cache" \
"--enable-cache" \
"--enable-disk-cache" \
"--enable-mem-cache" \
"--enable-proxy" \
"--enable-proxy-connect" \
"--enable-proxy-ftp" \
"--enable-proxy-http" \
"--enable-rewrite" \
"$@"

*** httpd.conf ***
<IfModule mod_proxy.c>
ProxyRequests On

<Proxy *>
    Order deny,allow
    Deny from all
    Allow from all
</Proxy>
# allow from all IST natuerlich nicht das wahre :-
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
ProxyVia On

#
# To enable the cache as well, edit and uncomment the following lines:
# (no cacheing without CacheRoot)
#
CacheRoot "/usr/local/apache2/proxy"
CacheEnable disk /
CacheSize 5
#CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
#NoCache a-domain.com another-domain.edu joes.garage-sale.com

</IfModule>
# End of proxy directives

Re: Apache 2.0.43 mod_proxy kein Caching

Posted by Nicole Haehnel <Ni...@epost.de>.
Oh, sorry!

Also OS ist RedHat Linux 8.0

Module:

httpd -l
Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_auth_anon.c
  mod_auth_dbm.c
  mod_auth_digest.c
  mod_file_cache.c
  mod_cache.c
  mod_disk_cache.c
  mod_include.c
  mod_log_config.c
  mod_env.c
  mod_mime_magic.c
  mod_cern_meta.c
  mod_expires.c
  mod_headers.c
  mod_usertrack.c
  mod_unique_id.c
  mod_setenvif.c
  mod_proxy.c
  proxy_connect.c
  proxy_ftp.c
  proxy_http.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_dav.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_info.c
  mod_cgi.c
  mod_cgid.c
  mod_dav_fs.c
  mod_vhost_alias.c
  mod_negotiation.c
  mod_dir.c
  mod_imap.c
  mod_actions.c
  mod_speling.c
  mod_userdir.c
  mod_alias.c
  mod_rewrite.c
  mod_so.c

config.nice:

#! /bin/sh
#
# Created by configure

"./configure" \
"--prefix=/usr/local/apache2" \
"--sysconfdir=/etc" \
"--localstatedir=/var" \
"--mandir=/usr/share/man" \
"--enable-file-cache" \
"--enable-cache" \
"--enable-proxy" \
"--enable-proxy-http" \
"--enable-ssl" \
"--enable-cgi" \
"--enable-cgid" \
"--enable-modules=all" \
"--enable-so" \
"--enable-disk-cache" \
"$@"


Da hätte ich mir aber bestimmt einiges sparen können, da
ich --enable-modules=all gemacht habe.
Aber ohne "--enable-disk-cache" und "--enable-cache" kam immer eine
Fehlermeldung, dass CacheRoot nicht bekannt ist, weil das Modul fehlt.

Danke!

Nicole



----- Original Message -----
From: "i.t" <i....@ithum.de>
To: "Nicole Haehnel" <Ni...@epost.de>
Sent: Thursday, December 05, 2002 10:14 PM
Subject: Re: Apache 2.0.43 mod_proxy kein Caching


> msg Donnerstag, 5. Dezember 2002 21:13 by Nicole Haehnel:
> > Hallo,
> >
> > ich habe den aktuellsten Apache selber mit allen Modulen kompiliert und
> > einen Reverse-Proxy eingerichtet. Soweit funktioniert das auch
wunderbar,
> > nur benutzt er den Cache nicht. Ich habe CacheRoot und die anderen
> > Einstellungen die für den Cache notwendig sind in der Config
eingetragen.
> >
> > CacheRoot /var/proxy
> > CacheDirLevels 5
> > CacheSize 50000
> > CacheGcInterval 12
> > CacheMaxExpire 24
> > CacheLastModifiedFactor 0.3
> > CacheDefaultExpire 1
> >
> >
> > Aber er cached einfach nichts!
> >
> > Kann mir jemand helfen?
>
> fehlt einige info:
> - OS (nehmen an ist *x wegen /var/proxy)
> - listing von httpd -l
> - cat config.nice
>
> um zu sehen, mit welchen modulen und wie der apache kompiliert ist
>
>  Gruß
> i.t
>
> --
>  . ___
>  |  |  Irmund     Thum
>  |  |  +49 6374 992541
>        +49 173 7405882
>