Page 1 of 1

open folder on client PC

PostPosted: 13. May 2015 17:12
by jack_lunn
Is it possible to open a windows explorer folder from a URL?
The folder is on a mapped drive on the XAMPP server.

I think it can be done by changing Apache httpd.conf

I have this in the conf..
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>

and it works fine, but if I add..

Alias /subfolder2 C:/folder2/subfolder2
<Directory "C:/folder2/subfolder2">
Options FollowSymLinks +Indexes
Order Allow,Deny
Allow from All
AllowOverride All Indexes Options
</Directory>

Apache will not start.

Re: open folder on client PC

PostPosted: 13. May 2015 17:16
by Nobbie
jack_lunn wrote:Apache will not start.


Look into the error log file and you will see a detailed error message. I would say, that "AllowOverride All Indexes Options" is invalid, only "AllowOverride All" should do it.

Re: open folder on client PC

PostPosted: 20. May 2015 16:11
by jack_lunn
Thanks Nobbie for your interest. I'm sorry but I haven't been able to look at this for a few days.
I have tried to reproduce the error and it has happened again.
It works fine without the alias and directory and even with your suggestion to use only "AllowOverride All" Apache just will not start!
Also there is nothing in the Apache error.log !!!
I have tried starting and stopping Apache and adding and deleting 'alias and directory' lines to httpd.conf but always with the original result -- all works fine until I modify httpd.cong.

Re: open folder on client PC

PostPosted: 20. May 2015 16:42
by Altrea
Hi,

Try to start Apache with the apache_start.bat script instead of the control panel.
This script will response with an error message why Apache could not get started.

Best wishes,
Altrea

Re: open folder on client PC

PostPosted: 21. May 2015 09:12
by jack_lunn
I closed Apache from the control panel and then tried the batch script.
The apache_start.bat script would not complete - it hung at 'echo Apache 2 is starting ...'
I stopped the batch from Task Manager.
I started Apache again as usual from control panel and below is the error.log
Not much help ??? I think
[Thu May 21 09:04:57.202933 2015] [mpm_winnt:notice] [pid 7324:tid 264] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Thu May 21 09:04:59.205048 2015] [mpm_winnt:notice] [pid 4776:tid 272] AH00364: Child: All worker threads have exited.
[Thu May 21 09:04:59.241050 2015] [mpm_winnt:notice] [pid 7324:tid 264] AH00430: Parent: Child process 4776 exited successfully.
[Thu May 21 09:05:39.214336 2015] [ssl:warn] [pid 8564:tid 388] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 21 09:05:39.518354 2015] [ssl:warn] [pid 8564:tid 388] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 21 09:05:39.565356 2015] [mpm_winnt:notice] [pid 8564:tid 388] AH00455: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.15 configured -- resuming normal operations
[Thu May 21 09:05:39.565356 2015] [mpm_winnt:notice] [pid 8564:tid 388] AH00456: Apache Lounge VC11 Server built: Jul 17 2014 11:50:08
[Thu May 21 09:05:39.565356 2015] [core:notice] [pid 8564:tid 388] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu May 21 09:05:39.615359 2015] [mpm_winnt:notice] [pid 8564:tid 388] AH00418: Parent: Created child process 8604
[Thu May 21 09:05:40.632417 2015] [ssl:warn] [pid 8604:tid 280] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 21 09:05:40.934435 2015] [ssl:warn] [pid 8604:tid 280] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 21 09:05:41.001439 2015] [mpm_winnt:notice] [pid 8604:tid 280] AH00354: Child: Starting 150 worker threads.

Re: open folder on client PC

PostPosted: 21. May 2015 11:23
by Nobbie
>all works fine until I modify httpd.cong.

How do you modify httpd.conf? Which tool do you use to insert or delete lines?

Re: open folder on client PC

PostPosted: 21. May 2015 14:30
by mark.mcdonald
Notepad / Wordpad/ Notepad++

Re: open folder on client PC

PostPosted: 22. May 2015 08:45
by jack_lunn
I use XAMPP Control Panel
I hit Config on Apache row
I choose Apache (httpd.conf)
This opens file in Notepad which I modify and save.
Then Quit and reload.

All OK at the moment with ...
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
# 13/05/2015 10.22
#Alias /subfolder2 C:/folder2/subfolder2
#<Directory "C:/folder2/subfolder2">
# Options FollowSymLinks +Indexes
# Order Allow,Deny
# Allow from All
# AllowOverride All
#</Directory>

Re: open folder on client PC

PostPosted: 24. May 2015 10:15
by s-light
out of curiosity - try to write the C: as c:
Code: Select all
Alias /subfolder2 "c:/folder2/subfolder2"
<Directory "c:/folder2/subfolder2">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

i don't know if the words are case-sensitve.. but in my old config i had written theme as i corrected theme above..
and normaly i found that the error_log or access_log shows about every error message...

sunny greetings
stefan