Jump to content
The Uniform Server Community

Need to access files on a different drive...


Morpheus
 Share

Recommended Posts

Hi everyone - happy new year!

 

I am replacing a PC webserver for a local business who were operating a Mambo site but I'm running into a small issue....

 

The previous IT guy has done some very weird stuff so to save some time I have used Uniform server. Getting the Mambo site up and running took almost 5 minutes :D but I have hit a snag! :lol:

 

The website serves up documents (PDFs) that are located on their network but are not within the scope of the W drive or the webroot so I need to invoke some kind of alias or redirection but I just can't make it work.

 

I found a post on the web suggesting that I map a network drive i.e. G: to the folder on the workstation containing the files and then access them using an alias entry as below but for testing purposes I have tried using the root of the local C drive:

 

The virtual host part is working great but the redirect / alias is driving me nuts!

 

An example of a link is "http://office.english-mutual.co.uk/files/EMW.pdf"

 

 

<VirtualHost *>

ServerName office.english-mutual.co.uk

ServerAlias english-mutual.co.uk *.english-mutual.co.uk

 

DocumentRoot /www/Intranet/html

 

#<Directory "/www/Intranet/html">

#Allow from all

#Options +Indexes

#Options Indexes FollowSymLinks ExecCGI

#</Directory>

 

Alias /files/ "C:/"

<Directory "C:/">

Options Indexes Includes

AllowOverride All

Order allow,deny

Allow from all

</Directory>

 

ServerAdmin webmaster@english-mutual.co.uk

ErrorLog logs/english-mutual.co.uk.com-error_log

CustomLog logs/english-mutual.co.uk.com-access_log common

</VirtualHost>

 

 

Regards, Adam

Link to comment
Share on other sites

:lol: Wow, if you think you took a short cut.. lol... all that is not needed. You can get the files by using alias itself... something like this should work:

 

Alias /cfiles/ "C:\"
<Directory "C:\">
Options Indexes Includes
AllowOverride All
Order allow, deny
Allow from all
</Directory>

 

Notice the C:'\' That \ matters cause it goes a different way for Windows.... / is for *nix based.

Link to comment
Share on other sites

A, I did not say put it in a virtual host, just put it in the conf file around where the other alias are... that would be better.

 

B, notice the change, the address is now cfile not file....

Link to comment
Share on other sites

Sorry if I confused you....

 

a) I did notice the change for /CFile/ and changed it back in my copy

 

:lol: I tried adding the code within the virtualhost section but, when that didn't work, I moved it outside to the bottom of the .conf file. I didn't think positioning would make any difference as there were no obvious enclosure statements around the other alias entries.

Link to comment
Share on other sites

If you are trying to use virtual host, you have to search the forum and look at every post that deals with virtual host. Some methods dont work and some do on some PC and some codes needs to be added sometimes....

 

Good Luck.

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...