Author |
|
dke
Joined: 13 Jul 2007 Posts: 61 Location: sweden
|
Posted: Tue 12 Aug '08 12:04 Post subject: Allow apache to get content from internal network path, how? |
|
|
Hi,
I'm trying to setup so apache can access stuff from other machines in my internal network, but i can't figure out how to do it
It would could look something like this, but it aint working!
Alias /network_content "\\server\h$\apache_stuff\"
<Directory "\\server\h$\apache_stuff">
Options FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
the above code does not work, im just trying to show what im trying to do.
thanks for the help! |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
|
Back to top |
|
dke
Joined: 13 Jul 2007 Posts: 61 Location: sweden
|
Posted: Tue 12 Aug '08 17:01 Post subject: |
|
|
Thanks, i've succesfully mounted a share now, but im still encountering a really strange problem when i try to run apache as a service.
When i run apache as a service no matter what user account i use i will get error 1 (which means it does not have privileges to access the network share)
But if i do start>run cmd
go to c:/program files/apache group/apache2/bin and type "httpd" in the dos-promt, apache will run with privileges to that share. Even if i use the same account as apache will use when i do the dos-promt thing i still don't get privileges through the service.
Whats up with that? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 12 Aug '08 20:00 Post subject: |
|
|
I should have asked first .. if this is XP home, then it is tough. You pretty much have to run as an Administrator which is not advisable.
XP Pro however has permissions you can customize. It's a little tricky and a bit time consuming but you have drive/folder/file permission in Pro that can be manipulated.
I cannot seem to deny Apache access to anything, I just do not necessarily give it permissions to things. I have apache on a second hard drive and apache has no rights to the C drive but listing folder contents so it cannot read or write to the system. |
|
Back to top |
|
dke
Joined: 13 Jul 2007 Posts: 61 Location: sweden
|
Posted: Wed 13 Aug '08 9:20 Post subject: |
|
|
i actually got it to work, it seems like apache does not like mounted pathes like "z:/mappeddrive" however when i configure apache to map the drives through //server/sharedfolder/ it works fine (premission wise to)
actually aliasing the mapped drive seemed to lead to some sort of php memory leak aswell, php ran out of memory really fast and was not dumping anything.
well all is fixed now, thank you for the help! |
|
Back to top |
|
mattinahat
Joined: 16 Sep 2011 Posts: 2
|
Posted: Thu 22 Sep '11 15:01 Post subject: |
|
|
So I know this topic was a bit old, but I'm running into the same problem.
I'm trying to map an alias with:
Alias /p "\\ps-file.location.edu\A$"
<Directory /p>
Order allow,deny
Allow from all
</Directory>
But every time I do I get a restricted error. I've tried running apache from the console but that doesn't change anything. I'm new at this, so I also don't know how to give a win7 the rights to "run as a service".
Any ideas?
Thanks!
-Matt |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 23 Sep '11 0:50 Post subject: |
|
|
use // and / or \\\\ and \\, backslashes need to be escaped.
<Directory "\\ps-file.location.edu\A$" >
It's usually
//computername/sharename/filepath |
|
Back to top |
|
mattinahat
Joined: 16 Sep 2011 Posts: 2
|
Posted: Fri 23 Sep '11 1:59 Post subject: |
|
|
Thanks for the quick response!
I switched it to forward slashes and now it gives me a 404 error? Something must be weird with my setup because the back slashes worked (at least to the point where it said I do not have permission) while the forward slashes can't even find the drive. |
|
Back to top |
|