logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Can you point Apache to a samba share on another computer?
Author
jpaulwhite



Joined: 14 Oct 2006
Posts: 10

PostPosted: Sat 14 Oct '06 16:42    Post subject: Can you point Apache to a samba share on another computer? Reply with quote

Hi,
Im running apache on Windows XP. I have a FC4 box with a Samba share I can see fine from my windows machine. In httpd.conf what should I type in order to share files from that directory? The bolded part in the container is what im trying to figure out.

Ex. When I go to Start|Run , and type \\192.168.0.8\bigwig\ it links me to that directory.

<Directory "c://192.168.0.8/bigwig/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

Any help is much appreciated. I hope its something as simple as what im thinking but I know from experience it almost never works out that way lol...

paul
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Sat 14 Oct '06 18:17    Post subject: Reply with quote

As far as i know Apache can't access a samba share, it can access network drivers so you have to mount it as such e.g. mount it on z:
Back to top
DeliriumServers



Joined: 17 Jun 2006
Posts: 54
Location: H Town

PostPosted: Sun 15 Oct '06 6:37    Post subject: Reply with quote

I agree, make a 'mapped network drive' out of the samaba share on your winxp box and replace c://192.168.0.8/bigwig/ with it's address

btw... an ip cannot be located on your c drive

-delirium
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Sun 15 Oct '06 13:07    Post subject: Reply with quote

Code:

LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.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

LoadModule proxy_html_module modules/mod_proxy_html.so
LoadFile   /server2/apache/bin/libxml2.dll

ProxyRequests Off
<Proxy *>

Order deny,allow
Allow from all

</Proxy>


ProxyPass /bigwig http://192.168.0.8/bigwig/
ProxyPassReverse /bigwig http://192.168.0.8/bigwig/
ProxyHTMLURLMap http://192.168.0.8/bigwig/ /bigwig

<Location /fritz>
ProxyPassReverse /
   SetOutputFilter    proxy-html
   ProxyHTMLURLMap    /   /bigwig/
   ProxyHTMLURLMap    /bigwig   /bigwig
   RequestHeader     unset   Accept-Encoding
</Location>


mod Proxy html can befound here http://www.apachelounge.com/download/
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sun 15 Oct '06 18:17    Post subject: Reply with quote

Another way to do this is to use four backslashes to represent the Windows UNC name:
Quote:

<Alias /bigwig "\\\\192.168.0.8/bigwig"
<Directory "\\\\192.168.0.8/bigwig">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

Performance is likely to be a problem unless this is a low-volume site.
Just checking a file's timestamp will require a network round-trip from your Apache server to 192.168.0.8.

-tom-


Last edited by tdonovan on Sun 15 Oct '06 18:26; edited 2 times in total
Back to top
DeliriumServers



Joined: 17 Jun 2006
Posts: 54
Location: H Town

PostPosted: Sun 15 Oct '06 18:20    Post subject: Reply with quote

@james blonde: that's a nice setup for proxying it! but I don't know if SAMBA shares have an http output? I don't know, feel free to correct me here

-delirium
Back to top
jpaulwhite



Joined: 14 Oct 2006
Posts: 10

PostPosted: Fri 20 Oct '06 14:57    Post subject: James Blond Reply with quote

Thanks! I tried it, but I didnt get it to work yet. I do have one question. Where you have Fritz there, is that supposed to be my machine name (The machine Apache is running on) or is that the name of a directory on my local machine. Im trying to figure out what goes there. Also, when I downloaded the module it said create a directory called mod_proxy_html in the modules directory then place all the files in there. I did that but when I looked at your code it looks like it is expecting those files to be in the main modules directory.

paul

p.s. Thanks for that tip too!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Fri 20 Oct '06 15:14    Post subject: Reply with quote

I should have correct fritz. Opps! Th location fritz does not exist real! It is an virtual location that is created by Apache so I can access the it by

http://localhost/fritz

And of cause it should be bigwig in the location instead of fritz *g*
The name of the location should match to the ProxyPass.


I wonder that it did not work to map a networkdrive to the samba and than create the Alias bigwig to that.

<Alias /bigwig "Z:\"
<Directory "Z:\">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Back to top


Reply to topic   Topic: Can you point Apache to a samba share on another computer? View previous topic :: View next topic
Post new topic   Forum Index -> Apache