Page 2 of 2

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 10:01
by lse123
<IfModule alias_module>
must be inside this tag correct... ? but still no works...

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 13:10
by Nobbie
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.

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 14:34
by lse123
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?

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 14:48
by lse123
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>

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 14:49
by Nobbie
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.

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 14:50
by lse123
what about g:/ hdd, dvd rom drive e:/ ... or others?

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 14:52
by JJ_Tagy
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).

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 15:00
by JJ_Tagy
lse123 wrote:what about g:/ hdd, dvd rom drive e:/ ... or others?

Yes.

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 15:03
by lse123
finally worked the same for d:/... required the change did in httpd-userdir.conf YOU NOT REFERRED?

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 15:07
by JJ_Tagy
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.

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 16:32
by lse123
to JJ_Tagy

you do not change it (httpd-userdir.conf) and worked for you?

Re: how a folder outside the htdocs folder like on

PostPosted: 22. May 2014 17:28
by JJ_Tagy
Yes, because I am not focused on user_mod.