当前位置: 动力学知识库 > 问答 > 编程问答 >

coldfusion - Unable to access shared folder on windows via apache on mac

问题描述:

I am trying to setup a local site on my mac.

The configuration is like this -

Application Server: Coldfusion 9

Webserver: Apache 2

I have got my local site up and running. But in this site, I wish to access the images hosted on my dev server (windows 2003). The images folder is shared and I can mount it from my mac.

I have added the virtual director in my httpd.conf like this -

Alias /images/covers/uk "//xxx.xx.x.xx/Imagesfolder/covers/uk/"

<Directory "//xxx.xx.x.xx/Imagesfolder/covers/">

Options Indexes FollowSymLinks

AllowOverride all

Order Allow,Deny

Allow from all

Require all granted

</Directory>

Alias /images/covers "//xxx.xx.x.xx/Imagesfolder/covers/"

<Directory "//1xxx.xx.x.xx/Imagesfolder/covers/">

Options Indexes FollowSymLinks

AllowOverride all

Order Allow,Deny

Allow from all

Require all granted

</Directory>

Here xxx.xx.x.xx is the ip of the windows server. Imagesfolder is the name of the shared folder on server.

However, I am not able to access this folder and I am getting 403 error.

Any idea how to fix this please.

网友答案:

You should mount the shared folder on your Mac and configure Apache to use the mounted directory as Alias. Apache cannot access SMB/CIFS shares by URL as you are trying to do.

Alias /images "/path/to/mounted/images-directory"
<Directory /path/to/mounted/directory>
  ...
</Directory>

I advise you to read Apache's manual to get more in deep details.

分享给朋友:
您可能感兴趣的文章:
随机阅读: