No access to user directory

Problems with the Windows version of XAMPP, questions, comments, and anything related.

No access to user directory

Postby darheim » 17. August 2009 14:41

I read the post from 39er back in November. However, I'm still stumped. I've read and reread the apache file as well as the post. It does not say exactly where in httpd.conf to place the Alias info.

I am new to dealing with Apache. Here is my problem. I have video files on 2 large drive outside the web root. The web root is on a much smaller drive incapable of holding video files. I am trying to make it possible to access these drives. I have tried following the instructions given, but as I stated, it doesn't say where in the httpd.conf file the instructions go.

I have tried this

Alias /videos "D:/videos"
<Directory "D:/videos">
Order allow,deny
Allow from all
</Directory>

under script alias in the files but no go. I have tried the Alias part under the alias_module and the rest down further under the other directory info. No luck. I have the same think for Drive E. Originally I wasn't going to use a folder but decided to thinking that may be the problem. If I try to play the file, which on the webpage shows as http://[IP address]/video.avi I get Error 404 Object not found. If I enter the ip address and the folder i get a 403 forbidden error.
I should mention that this is on a home server not going out on the internet. This project is being done to keep my kids from scratching my dvd's. Constantly replacing them gets expensive. Putting the movie on a server and letting them watch them on their PC seemed a better idea.

Any assistance you can give to make this work is greatly appreciated. As stated, I have little knowledge of the workings of Apache. Since I am doing Allow from all, shouldn't the 403 error not show? Am I doing something wrong?
darheim
 
Posts: 3
Joined: 17. August 2009 14:19

Re: No access to user directory

Postby Izzy » 17. August 2009 21:51

First revert the httpd.conf file back to it's default settings, then save the file and restart Apache - if Apache starts then your httpd.conf file is fine after all the editing.

Next put your Alias Directive in to the \xampp\apache\conf\extra\httpd-xampp.conf file after the webalizer entry (for convenience), then save the httpd-xampp.conf file and restart Apache.

Now try again to see the videos - BTW that's a good idea of yours to show the videos for the kids this way :)

Code: Select all
Alias /webalizer "C:/xampp3/webalizer/"
<Directory "C:/xampp3/webalizer">
<IfModule php5_module>
<Files "webalizer.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

Alias /videos "D:/videos"
<Directory "D:/videos">
Order allow,deny
Allow from all
</Directory>

With server errors the \xampp\apache\logs\error.log file can usually give more detailed messages than does the web browser.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: No access to user directory

Postby darheim » 18. August 2009 04:43

Thank you Izzy. I won't get an opportunity to try this till Friday but you can bet I will. I assume for Drive E: I put the same thing under where I put the alias for Drive D:. Can they both say videos or do I need to name Drive E: something like video1?

Again, thanks for your help. I've been pulling out what little hair remains trying to figure it out.
darheim
 
Posts: 3
Joined: 17. August 2009 14:19

Re: No access to user directory

Postby Izzy » 18. August 2009 06:59

darheim wrote:I assume for Drive E: I put the same thing under where I put the alias for Drive D:.
That's correct.


darheim wrote: Can they both say videos?
That would cause Apache to get very confused as to which videos to get from which folder and it would inevitably overheat and explode into tiny fragments. :)

The use of a different Alias would be best for example /videod for "D:/videod" and /videoe for "E:/videoe" and so on - using the drive letter in the Alias name may make it simpler to identify what movies are being watched, by whom and when - you can even check these details by using the C:\xampp\apache\logs\access.log file.

Apache Documentation Links:
http://httpd.apache.org/docs/2.2/mod/mo ... html#alias
http://httpd.apache.org/docs/2.2/mod/directives.html
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: No access to user directory

Postby darheim » 19. August 2009 00:59

Izzy.

"That would cause Apache to get very confused as to which videos to get from which folder and it would inevitably overheat and explode into tiny fragments"

Is that all that would happen? Whew! I was worried there for a moment. I thought it would cause a wormhole to open and completely disrupt the space-time continuum and we would find ourselves in another galaxy! I know, I know.......too much Star Trek. What can I say?

Seriously, your explanation makes a great deal of sense and I was concerned whether it would confuse Apache. I'll be sure to make the correct adjustments when I modify the file.

I deeply appreciate your help and will modify the file Friday (when I finally have a day off). I will let you know how it goes.
darheim
 
Posts: 3
Joined: 17. August 2009 14:19


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 44 guests