» »

Apache .. dostop do file-ov na drugi particiji preko HTTP protokola

Apache .. dostop do file-ov na drugi particiji preko HTTP protokola

mpasha ::

mene pa zanima kako konfigurirat Apache server da lahko dodstopas do druge particije serverja preko http protokola...

recimo strežnik teče na c:/blabla
neke datoteke pa so na d:/hoho

kako lahko zdaj dostopam do teh datotek v obliki: http://mypage/hoho/test.txt

kaj morem narediti

DC- ::

Poglej si mod_proxy, ki ti omogoča tole

mpasha ::

ProxyPass Directive
Description: Maps remote servers into the local server URL-space

This directive allows remote servers to be mapped into the space of the local server; the local server does not act as a proxy in the conventional sense, but appears to be a mirror of the remote server. path is the name of a local virtual path; url is a partial URL for the remote server and cannot include a query string.

Suppose the local server has address http://example.com/; then
ProxyPass /mirror/foo/ http://backend.example.com/
will cause a local request for http://example.com/mirror/foo/bar to be internally converted into a proxy request to http://backend.example.com/bar.


Verjetno je to to ??

jaz bi potem moral dat recimo /mirror/mydata d:/hoho

?

OmegaBlue ::

Joj ne ga srat s mod_proxy, naredi alias in se prepričaj da ima strežnik ustrezne privilegije za branje.

V konfiguracijsko datoteko za to domeno (sites-enabled) dodaj "alias /hoho d:/hoho".
Never attribute to malice that which can be adequately explained by stupidity.

mpasha ::

<Host name="localhost"  appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">

    <Context path="/files"
             docBase="d:\hoho"
             reloadable="true"
             crossContext="true" />
</Host>


DELA!

naredil sem tako v server.xml datoteki
in ko grem na
http://localhost/files/test.txt
dela

Zgodovina sprememb…

  • spremenil: mpasha ()

OmegaBlue ::

Em.. imaš to čisti apache al kak paket nameščen da imaš xml konfiguracijo?
Never attribute to malice that which can be adequately explained by stupidity.

krho ::

Tole je pomoje Tomcat, ker neki WARi noter strašijo...
si.Mail odprto-kodni odjemalec elektronske pošte. - http://www.simail.si
Uredite si svojo zbirko filmov, serij in iger - http://xcollect.sf.net

mpasha ::

OmegaBlue je izjavil:

Em.. imaš to čisti apache al kak paket nameščen da imaš xml konfiguracijo?


ne ne .. samo tomcat je...

OmegaBlue ::

To se splača drugič omenit, me je skoraj pobralo.
Never attribute to malice that which can be adequately explained by stupidity.


Vredno ogleda ...

TemaSporočilaOglediZadnje sporočilo
TemaSporočilaOglediZadnje sporočilo
»

IP kamera MJPEG stream embedded na spletno stran

Oddelek: Programiranje
121666 (1153) abazuu
»

Apache in Node.JS

Oddelek: Izdelava spletišč
91966 (1652) dunda
»

Za strokovnjake; forwardiranje portov za routerjem

Oddelek: Omrežja in internet
151715 (1268) Rok Woot
»

Moji strežniki

Oddelek: Omrežja in internet
323467 (2383) Hexx
»

Apache - localhost JA, IP naslov NE

Oddelek: Omrežja in internet
186621 (6480) ManDriver

Več podobnih tem