Apache Network Drive Alias

后端 未结 4 638
小蘑菇
小蘑菇 2021-01-07 12:56

I\'ve searched through stackoverflow for a similiar problem, but none of the solutions seem to work.

I\'m running WAMP and have a network drive T:\\ whi

相关标签:
4条回答
  • 2021-01-07 13:18

    caltor is right , little edit here , you can use <Directory "/p"> cause it has alias.But I hate writing network drive in config like //p... also

    There is another problem occurs here , in this method , you cannot execute exec() or batch file , cannot take the information of directory , open_dir etc cannot return a result , also apache cannot start as a service . To solve that,

    First of all download http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx Extract zip file to C:/sys. Open cmd , and

    cd c:/sys (enter)
    psexec -i -s cmd.exe
    

    then a new command line appears . All you need

    net use j: \\lethea\sharedfolder /persistent:yes
    

    will ask username and password of lethea pc . Here is j: the short name of the network drive . After doing this , in httpd.conf folder you dont need to create alias or write full network map to Documentroot and directory

    Documentroot = "j:/mywww"  #referencing \\lethea\sharedfolder\mywww
    <Directory "j:/mywww">
    

    ...

    0 讨论(0)
  • 2021-01-07 13:20

    Why not just alias to T:\, as in Alias /p T:\? Otherwise, my guess is that Apache doesn't have the necessary permissions to access the specified UNC (particularly, the A$ bit is probably screwing things up as it is a special share).

    0 讨论(0)
  • 2021-01-07 13:21

    You need to use forward slashes instead of backslashes or escape them all using an additional backslashas well as enclosing the paths in quotes as stated by Xophmeister. Eg:

    Alias /p "//ps-file.server_location.edu/A$/"
    <Directory "//ps-file.server_location.edu/A$/">
    Order allow,deny
    Allow from all
    </Directory>
    

    or

    Alias /p "\\\\ps-file.server_location.edu\\A$\\"
    <Directory "\\\\ps-file.server_location.edu\\A$\\">
    Order allow,deny
    Allow from all
    </Directory>
    

    You are correct to use a UNC path unless you create a mapped drive in the user profile being used to run the apache service.

    0 讨论(0)
  • 2021-01-07 13:26

    to solve this you will need: give permission to the board administrator httpd.exe file authenticate the service with an administrator of the User Services pane windows leave the httpd.conf file so

    DocumentRoot "//192.168.50.2/g/htdocs"

    set the ip of the host where the files for this machine name by apache does not recognize

    0 讨论(0)
提交回复
热议问题