image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old January 11th, 2001, 11:57 AM
Registered User
 
Join Date: Jan 2001
Posts: 147
Thanks: 0
Thanked 0 Times in 0 Posts
monty is on a distinguished road
I heard that apache has a built in proxy server module. Anyone know if this is true and if so how to turn it on?

peter
Reply With Quote
  #2  
Old January 11th, 2001, 04:31 PM
Registered User
 
Join Date: Jan 2001
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Cadre is on a distinguished road
Lightbulb

Inside your httpd.conf there is a section you need to uncomment to turn on the proxy server. If you don't have it, here is the example code they've included in the default config files.

Make sure you setup the Direcotry proxy:* correctly. You wouldn't want your proxy server being abused by people outside your network!

< IfModule mod_proxy.c >
ProxyRequests On
< Directory proxy:* >
Order deny,allow
Deny from all
Allow from .your_domain.com
< /Directory >

# 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

CacheRoot "/usr/local/apache/proxy"
CacheSize 5
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
#NoCache a_domain.com another_domain.edu joes.garage_sale.com
< /IfModule >

Note: I had to add spaces into the directives so they the braind-dead vBulletin wouldn't clobber the line. You'll probably have to remove them for Apache to parse the file correctly.
Reply With Quote
  #3  
Old June 23rd, 2001, 12:12 AM
Registered User
 
Join Date: Mar 2001
Posts: 126
Thanks: 0
Thanked 0 Times in 0 Posts
RHITMacMan is on a distinguished road
Exclamation Got It to Work

Thank you Cadre for your tips and help with this one. I was able to finally get the proxy server function of Apache to work using the tip above after only a few minor problems. I thought I would document the problems I encountered incase you run into them yourself.

First, make a copy of your "httpd.conf" file for editing and making modifications. Do not use Microsoft Word for editing the source text file. I tried doing this and even told Word to save the file in text format but it did not put it in a plain ASCII text format. I believe it put it in a rich text format instead. By using the "httpd -t" command with the terminal application I was able to do a syntax check of the "httpd.conf" file. Using the "more httpd.conf" command when in the "/private/etc/httpd" directory (location of the "httpd.conf" file) is useful in displaying the file in the terminal to make sure it is of good text format.

You need to also remember to uncomment (remove the # from the beginning of the line) two lines at the beginning of the "httpd.conf" file in order to load the modules needed for proxy serving. They are as follows:

LoadModule proxy_module libexec/httpd/libproxy.so

AddModule mod_proxy.c

The default proxy commands I found in my "httpd.conf" were slightly different from what is found above. In particular the "CacheRoot" line in my file is different. You also need to make sure to modify the "Allow from" line to show the IP address (or domain name address) of the computer that will be proxying your machine. I'm told that only one IP address is allowed per line. So if you are making a proxy server for a home network like myself, you will need to make multiple "Allow from" lines for each computer on your home network. Here's how my proxy section of the file looks after modication:

< IfModule mod_proxy.c >
ProxyRequests On

< Directory proxy:* >
Order deny,allow
Deny from all
Allow from 192.162.60.61
< /Directory >

#
# 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 "/private/var/run/proxy"
CacheSize 5
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
# NoCache a_domain.com another_domain.edu joes.garage_sale.com

< /IfModule >

There are not actually spaces after or before the "<" and ">" operators, this is just done so that the statement will not be confused with HTML statements when displayed here.

Now that this is done simply go the Sharing System Preference panel in MacOS X and click on the start web sharing button. If you really screwed up your "httpd.conf" or saved it in a non-plain ASCII text format then Web Sharing will never actually start up and kind of hang while trying to start. If you've made it this far, there is just one more step.

Go to the other computers on your home network and setup proxying in your net apps. For example, in Netscape open the preferences and select "Proxies" in the advanced section and select "Manual Proxy Configuration." Now click on view and setup the proxies for HTTP, FTP, and Security (or SSL) using the IP address (or domain name address) of the computer you setup proxying on. Set the port to 80 unless you modified this default port setting in the "httpd.conf" as well. As a note, this should allow all other computers on the network to access web content via the proxy server you have created whether they are a Windows or Mac computer.

The only problem I have had is being able to use mail applications and programs like AOL Instant Messager to use the proxy server for connections. If anyone has any suggestions on how to get these things to work via the MacOS X Apache proxy server please let me and the rest of us here know.

Thanks again everyone...
__________________
RHITMacMan

Last edited by RHITMacMan; June 23rd, 2001 at 12:19 AM.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 500 Internal Server Error mr. k Design & Media 1 October 10th, 2003 03:13 AM
SHUTDOWN without warning SCARY!! astro_sk Mac OS X System & Mac Software 10 May 16th, 2003 02:45 PM
Running apache server on old iMac? ksv Design & Media 2 February 16th, 2003 11:41 AM
Help! I think I've corrupted the original apache on OS X Server Plastical Mac OS X System & Mac Software 4 April 8th, 2002 04:42 PM
Question about proxy and apache webserver spekt Apple News, Rumors & Discussion 0 March 12th, 2002 10:57 AM


All times are GMT -5. The time now is 07:18 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.