Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Help needed with Apache Web server

Thread Tools
 
Search this Thread
 
Old 08 August 2002, 03:50 PM
  #1  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Unhappy

Installing the Apache port for Windows and can get the web part working OK. Want to use the Proxy Caching function too, but when I enable the module and put the Cache commands in the httpd.conf file, the server won't start.

Any ideas on where to start looking?

Also, with the web server on port 80 can you have the proxy on another port (say 8080)?

Stefan
Old 08 August 2002, 03:55 PM
  #2  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

Which version, 1.3.x or 2.0? What does your error_log say? mod_proxy isn't part of the core, it's a seperate module that needs compiling (or dynamically loading) into the server.

Forgot your port Q. Yes, you can have Apache listen on port 8080 too. Set up a virtualhost for port 8080 only and have your proxy settings in that virtualhost only:

<VirtualHost nn.nn.nn.nn:8080>
ProxyRequests On
...
</VirtualHost>

Steve.


[Edited by stevencotton - 8/8/2002 3:59:08 PM]
Old 08 August 2002, 04:02 PM
  #3  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

Steve,

It's version 2.0.39. I downloaded and ran the MSI package "apache_2.0.39-win32-x86-no_ssl", then modded the httpd.conf to enable these lines:-

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so

#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
<IfModule mod_proxy.c>
ProxyRequests On
#
<Proxy *>
Order deny,allow
Deny from all
Allow from .rdf-consulting.co.uk
</Proxy>

#
# 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 "C:/Program Files/Apache Group/Apache2/proxy"
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.

I've check the \modules folder and the ones I've enabled do exist.

Stefan
Old 08 August 2002, 04:03 PM
  #4  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

Sorry, here's the error log file.

[Thu Aug 08 15:57:23 2002] [notice] Parent: Created child process 782
[Thu Aug 08 15:57:23 2002] [notice] Child 782: Child process is running
[Thu Aug 08 15:57:24 2002] [notice] Child 782: Acquired the start mutex.
[Thu Aug 08 15:57:24 2002] [notice] Child 782: Starting 250 worker threads.
[Thu Aug 08 16:02:14 2002] [notice] Parent: Received restart signal -- Restarting the server.
Syntax error on line 896 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf:
Invalid command 'CacheRoot', perhaps mis-spelled or defined by a module not included in the server configuration
[Thu Aug 08 16:02:14 2002] [warn] (995)Unknown error: winnt_accept: Asynchronous AcceptEx failed.
[Thu Aug 08 16:02:15 2002] [notice] Child 782: Released the start mutex
[Thu Aug 08 16:02:16 2002] [notice] Child 782: Waiting for 250 worker threads to exit.
[Thu Aug 08 16:02:16 2002] [notice] Child 782: All worker threads have exited.
[Thu Aug 08 16:02:16 2002] [notice] Child 782: Child process is exiting

Stefan
Old 08 August 2002, 04:03 PM
  #5  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

Looks good so far. What does the error_log say when you try and start the server?

Steve.
Old 08 August 2002, 04:07 PM
  #6  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

Hmm, there's no such directive as "CacheRoot" within mod_proxy, try loading mod_cache first.

Steve.
Old 08 August 2002, 04:11 PM
  #7  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

When I try to start the service, I get a "The requested operation has failed" dialog box.

If I look in the error.log file there isn't any more info added; just the stuff from the above post.

Stefan
Old 08 August 2002, 04:13 PM
  #8  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

httpd.apache.org/docs-2.0/mod/mod_cache.html:

Summary

This module is experimental. Documentation is still under development.

What happens if you disable the caching part? Let's get mod_proxy working first.
Old 08 August 2002, 04:16 PM
  #9  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

It works. Only fails when I add the Cache.... commands.

Stefan
Old 08 August 2002, 04:20 PM
  #10  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

Copy the configuration given in the URL above, if that doesn't work then you'll either have to downgrade to 1.3 (not recomended on Win32 since 2.0.39 is a native port), or go without caching. I don't know if there's a version of Squid for Win32?

Steve.
Old 08 August 2002, 04:34 PM
  #11  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

Thanks Steve.

I'm running Squid on a Linux box just now, but want to move the proxy onto another server running NT4. I saw a squid port for Cygwin, but (with my limited knowledge) that didn't look like a native port to me.

I've checked that URL and it looks like the proxy LoadModules commands are there, but the cache ones aren't in the default httpd.conf file. That would explain why the commands fail.

The VirtualHosts thing is working a treat.

Thanks again for your help,

Stefan
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Scott@ScoobySpares
Full Cars Breaking For Spares
61
11 January 2021 03:08 PM
taylor85
Wanted
2
13 September 2015 04:57 PM
AzzDSM
Engine Management and ECU Remapping
4
13 September 2015 03:59 PM
robbie1988
Wanted
2
13 September 2015 09:25 AM
Scooby-Doo 2
Wheels And Tyres For Sale
1
09 September 2015 06:51 PM



Quick Reply: Help needed with Apache Web server



All times are GMT +1. The time now is 05:10 PM.