how a folder outside the htdocs folder like on

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

Re: how a folder outside the htdocs folder like on

Postby lse123 » 22. May 2014 10:01

<IfModule alias_module>
must be inside this tag correct... ? but still no works...
Leonidas Euripide Savvides
lse123
 
Posts: 128
Joined: 15. November 2008 13:49
Location: Polis, Paphos
XAMPP Version: 1.8.3-3
Operating System: vista 64 ultimate

Re: how a folder outside the htdocs folder like on

Postby Nobbie » 22. May 2014 13:10

lse123 wrote:but still no works...


Error 403 means, that the User, which executes the Apache Process (this is configured in httpd.conf by "User = ...") and also the Group ("Group = ...." in httpd.conf) may not access the related Folder (i.e. C:/Users/User/Pictures/ or G:/Downloads/video2) due to missing system rights. This is a Windows related problem. Change the permissions of the Folder or run Apache with a different User.

The problem might be the letter "G:", because drive letters are specific to the logged in User (which is different from the Apache User, mostly "System" under Windows). That means, that "G:" is unkown to Apache. If you want to access a NAS drive or similar, you must NOT use drive letters in the ALIAS (and even not in the Directory-Clause), but use so callec "UNC" Path, that looks like: //servername/share/Downloads/video2).

At next, your ALIAS clause is very unclean, you should use "balanced" slashes, that means if you do not use a trailing slash in the first part (the name of the ALIAS), you also should not use a slash in the corresponding path, ore vice verse (use slashes in both). Example

You wrote

Code: Select all
Alias /video2 "G:/Downloads/video2/"


This is inconsequently used and may lead to problems in certain environments. Either leave slashes out generally or append them in both parts:

Code: Select all
Alias /video2 "G:/Downloads/video2"


or

Code: Select all
Alias /video2/ "G:/Downloads/video2/"


Finally the similar problem in your Directory-Clause, that should match to the ALIAS and should not leave out a trailing slash (as you did) or append a slash, when its not applied in Alias. Finally your code should look like this:

Code: Select all
Alias /video2/ "G:/Downloads/video2/"
<Directory "G:/Downloads/video2/">
<-- you omitted the trailing slash

or

Code: Select all
Alias /video2/ "G:/Downloads/video2/"
<Directory "G:/Downloads/video2/">


But you mixed it up randomly instead. And following the first advice (not to use drive letters for external Servers), youre configuration should look like:

Code: Select all
Alias /video2/ "//servername/share/Downloads/video2/"
<Directory "//servername/share/Downloads/video2/">


Of course, replace "servername" and "share" by the corresponding name in your environment.
Nobbie
 
Posts: 6775
Joined: 09. March 2008 13:04

Re: how a folder outside the htdocs folder like on

Postby lse123 » 22. May 2014 14:34

servername is ip of localhost?

"This is a Windows related problem. Change the permissions of the Folder o"
in permissions i have full but no result?
Leonidas Euripide Savvides
lse123
 
Posts: 128
Joined: 15. November 2008 13:49
Location: Polis, Paphos
XAMPP Version: 1.8.3-3
Operating System: vista 64 ultimate

Re: how a folder outside the htdocs folder like on

Postby lse123 » 22. May 2014 14:48

this worked
httpd-xampp.conf
Alias /video "C:/Users/User/Documents/My Website/"
<Directory "C:/Users/User/Documents/My Website">
AllowOverride all
Require all granted
</Directory>

httpd-userdir.conf
# Settings for user home directories
#
# Required module: mod_userdir

<IfModule userdir_module>

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received. Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir "Documents/My Website"

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "C:/Users/User/Documents/My Website">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

</IfModule>
Leonidas Euripide Savvides
lse123
 
Posts: 128
Joined: 15. November 2008 13:49
Location: Polis, Paphos
XAMPP Version: 1.8.3-3
Operating System: vista 64 ultimate

Re: how a folder outside the htdocs folder like on

Postby Nobbie » 22. May 2014 14:49

lse123 wrote:servername is ip of localhost?


No.

lse123 wrote:"This is a Windows related problem. Change the permissions of the Folder o"
in permissions i have full but no result?


You did not understand it. Sorry, but you have not enough basic knowlodge about these things, you should ask someone to do this job for you, it is impossible to give all the help here, as you have no idea how it all works. We will struggle another weeks and month without coming further, unfortunately to configure a webserver is a difficult for a well educated web administrator. Of course you can learn all these things, but a forum cannot replace education and documentation. I am sorry, but i give up.
Nobbie
 
Posts: 6775
Joined: 09. March 2008 13:04

Re: how a folder outside the htdocs folder like on

Postby lse123 » 22. May 2014 14:50

what about g:/ hdd, dvd rom drive e:/ ... or others?
Leonidas Euripide Savvides
lse123
 
Posts: 128
Joined: 15. November 2008 13:49
Location: Polis, Paphos
XAMPP Version: 1.8.3-3
Operating System: vista 64 ultimate

Re: how a folder outside the htdocs folder like on

Postby JJ_Tagy » 22. May 2014 14:52

Nobbie wrote:...At next, your ALIAS clause is very unclean, you should use "balanced" slashes, that means if you do not use a trailing slash in the first part (the name of the ALIAS), you also should not use a slash in the corresponding path, ore vice verse (use slashes in both)...

Interesting. I've not had problems with it and the existing configuration delivered with XAMPP has the exact same balance (or lack of).
JJ_Tagy
 
Posts: 544
Joined: 30. January 2012 13:44
XAMPP Version: 1.8.3
Operating System: Windows 7 x64

Re: how a folder outside the htdocs folder like on

Postby JJ_Tagy » 22. May 2014 15:00

lse123 wrote:what about g:/ hdd, dvd rom drive e:/ ... or others?

Yes.
JJ_Tagy
 
Posts: 544
Joined: 30. January 2012 13:44
XAMPP Version: 1.8.3
Operating System: Windows 7 x64

Re: how a folder outside the htdocs folder like on

Postby lse123 » 22. May 2014 15:03

finally worked the same for d:/... required the change did in httpd-userdir.conf YOU NOT REFERRED?
Leonidas Euripide Savvides
lse123
 
Posts: 128
Joined: 15. November 2008 13:49
Location: Polis, Paphos
XAMPP Version: 1.8.3-3
Operating System: vista 64 ultimate

Re: how a folder outside the htdocs folder like on

Postby JJ_Tagy » 22. May 2014 15:07

lse123 wrote:finally worked the same for d:/... required the change did in httpd-userdir.conf YOU NOT REFERRED?

I didn't change that file.
JJ_Tagy
 
Posts: 544
Joined: 30. January 2012 13:44
XAMPP Version: 1.8.3
Operating System: Windows 7 x64

Re: how a folder outside the htdocs folder like on

Postby lse123 » 22. May 2014 16:32

to JJ_Tagy

you do not change it (httpd-userdir.conf) and worked for you?
Leonidas Euripide Savvides
lse123
 
Posts: 128
Joined: 15. November 2008 13:49
Location: Polis, Paphos
XAMPP Version: 1.8.3-3
Operating System: vista 64 ultimate

Re: how a folder outside the htdocs folder like on

Postby JJ_Tagy » 22. May 2014 17:28

Yes, because I am not focused on user_mod.
JJ_Tagy
 
Posts: 544
Joined: 30. January 2012 13:44
XAMPP Version: 1.8.3
Operating System: Windows 7 x64

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 90 guests