Help for istruction "Directory" in httpd.conf

Alles, was den Apache betrifft, kann hier besprochen werden.

Help for istruction "Directory" in httpd.conf

Postby hispanico » 12. August 2009 14:47

I have a problem with config istruction "Directory". In my file httpd.conf i have these lines:

<Directory "Z:">
Allow from all
</Directory>

This hard-disk is firewire and is connect to my computer but prevalent remain power-off and when i want watch some video inside i put power-on.
The problem born here....infact if i left these lines in the file httpd.conf, the server apache non start because find it power-off, windows event show this error:

The Apache service named reported the following error:
>>> <Directory "Z:"> path is invalid.

So i must "delete" these lines from httpd.conf::

#<Directory "Z:">
#Allow from all
#</Directory>

In this way apache start normally, but if after i put in power-on the external drive (z), the files inside aren't see from the server apache. I must stopped apache, modify file httpd.conf and restart the server.

There is the way or an special istruction for httpd.conf, that start server anyway also if the drive is power-off and contain the istruction <Directory> to see the files ?

Thank
hispanico
 
Posts: 7
Joined: 12. August 2009 14:35

Re: Help for istruction "Directory" in httpd.conf

Postby Wiedmann » 12. August 2009 14:51

There is the way or an special istruction for httpd.conf, that start server anyway also if the drive is power-off and contain the istruction <Directory> to see the files ?

No. A given path for <Directory> must always exists.

Well, you can mount your external harddisk into a subdir with is always present. And use this subdir in the <Directory> directive.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Help for istruction "Directory" in httpd.conf

Postby hispanico » 12. August 2009 14:57

Wiedmann wrote:
There is the way or an special istruction for httpd.conf, that start server anyway also if the drive is power-off and contain the istruction <Directory> to see the files ?

No. A given path for <Directory> must always exists.

Well, you can mount your external harddisk into a subdir with is always present. And use this subdir in the <Directory> directive.


Thank for reply......but escuse me but i don't understand. When i plug-on the drive the windows system, addict a letter to drive and it's impossible insert it in a subdirectory.
Or there is an istruction diretory ex.... by C: to Z: ??

Thank
hispanico
 
Posts: 7
Joined: 12. August 2009 14:35

Re: Help for istruction "Directory" in httpd.conf

Postby Wiedmann » 12. August 2009 15:36

When i plug-on the drive the windows system, addict a letter to drive and it's impossible insert it in a subdirectory.

http://support.microsoft.com/?scid=kb%3Ben-us%3B307889&x=5&y=10

(btw: a simple junction point should also work.)
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Help for istruction "Directory" in httpd.conf

Postby hispanico » 12. August 2009 18:00

Wiedmann wrote:
When i plug-on the drive the windows system, addict a letter to drive and it's impossible insert it in a subdirectory.

http://support.microsoft.com/?scid=kb%3Ben-us%3B307889&x=5&y=10

(btw: a simple junction point should also work.)
Thank for your advise.....

Read information if i understand....i must create a mounted drive (a empty folder) in my external drive Z, like new folder.

Image

Now in httpd.conf i must write:

<Directory "Z:\Nuova">
Allow from all
</Directory>

so in this way apache start and when plugged-on external drive, the server can see inside ??? or i am wrong ?

Btw.....I think that junction point for you is a shortcut windows ??
hispanico
 
Posts: 7
Joined: 12. August 2009 14:35

Re: Help for istruction "Directory" in httpd.conf

Postby Wiedmann » 12. August 2009 18:18

i must create a mounted drive (a empty folder) in my external drive Z,

No, you must mount the external drive to a folder on your (local) harddisc. Not to a folder on the external drive itself (no drive, no folder, because the drive with this folder does not exists).

think that junction point for you is a shortcut windows ??

No. These are different things (a junction point is similar to a reparse point, see above). A shell shortcut is something else and Apache can't work with them.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Help for istruction "Directory" in httpd.conf

Postby hispanico » 12. August 2009 19:02

Wiedmann wrote:No, you must mount the external drive to a folder on your (local) harddisc. Not to a folder on the external drive itself (no drive, no folder, because the drive with this folder does not exists).


Okay see my screenshot, G is a my local drive:

Image

Now in httpd.conf i can write this:

<Directory "Z:\Nuova">
Allow from all
</Directory>

and again (escuse me...) follow the istructions this folder must be empty...and i must put my file in ???

Thank
hispanico
 
Posts: 7
Joined: 12. August 2009 14:35

Re: Help for istruction "Directory" in httpd.conf

Postby Wiedmann » 12. August 2009 19:13

Okay see my screenshot,

Now you can access your "G:\" drive also with "Z:\Nuava", instead of your "Z:\" drive with e.g. "G:\Nuava".

(Just follow the Microsoft examples. They are just using a CDROM instead of a external firewire drive.)
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Help for istruction "Directory" in httpd.conf

Postby hispanico » 12. August 2009 20:36

Wiedmann wrote:
Okay see my screenshot,

Now you can access your "G:\" drive also with "Z:\Nuava", instead of your "Z:\" drive with e.g. "G:\Nuava".

(Just follow the Microsoft examples. They are just using a CDROM instead of a external firewire drive.)

So

<Directory "Z:\Nuova">
Allow from all
</Directory>

is correct ??

My external drive (Z) is:

z:\Documents
\Video

so i can left the folders in this way....and when power-on the drive apache server view this folders ?

Thank again
hispanico
 
Posts: 7
Joined: 12. August 2009 14:35

Re: Help for istruction "Directory" in httpd.conf

Postby hispanico » 13. August 2009 17:16

Yes Yes......BIG THANK .....Wiedmann i solved it.

After write an example.


Hispanico
hispanico
 
Posts: 7
Joined: 12. August 2009 14:35

Re: Help for istruction "Directory" in httpd.conf

Postby hispanico » 13. August 2009 21:22

Wiedmann i send you a PM.... :D :D

Hispanico
hispanico
 
Posts: 7
Joined: 12. August 2009 14:35


Return to Apache

Who is online

Users browsing this forum: No registered users and 2 guests

cron