logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Alias problem
Author
robbeck



Joined: 06 Aug 2011
Posts: 6

PostPosted: Sat 06 Aug '11 8:00    Post subject: Alias problem Reply with quote

Hi, I'm new and hoping someone can figure out what I'm doing wrong. I am using Apache 2.2.19 on a Windows XP machine to serve video and music to my Roku. I am trying to set up an alias to access another drive and can't seem to get it right. The Apache server won't start (the requested operation has failed), yet there is no new entry in the error log. When I run test configuration there are no errors there, either.

Here is part of the .conf file:
Code:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "f:/www/"

#

<Directory "f:/www/">
    #
     # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

Alias /media/music z:/rob
<Directory "z:/rob">
Order allow,deny
Allow from all
</Directory>


I've tried different things like putting quotes around the first z:/rob, putting forward slashes at the end of everything but I can't get it right for some reason. Here is a picture of my normal web server:

I want to add an alias for the music folder for z:\rob,
Thanks in advance to anyone who can help and I hope I've provided enough information.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Sat 06 Aug '11 12:19    Post subject: Reply with quote

Was there an error in the Windows Event Viewer ?

Try the following:

DocumentRoot f:/www


<Directory />
Options FollowSymLinks
AllowOverride none
Order allow,deny
Allow from all
</Directory>

Alias /media/music "z:/rob"


Steffen
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Sat 06 Aug '11 12:20    Post subject: Reply with quote

Just type in adres bar your aliasname

or make symlink


http://www.rekenwonder.com/linkmagic.htm
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 06 Aug '11 14:55    Post subject: Reply with quote

Is that z: drive a networkdrive?
Back to top
robbeck



Joined: 06 Aug 2011
Posts: 6

PostPosted: Sat 06 Aug '11 16:36    Post subject: Reply with quote

Steffen wrote:
Was there an error in the Windows Event Viewer ?

Try the following:

DocumentRoot f:/www


<Directory />
Options FollowSymLinks
AllowOverride none
Order allow,deny
Allow from all
</Directory>

Alias /media/music "z:/rob"


Steffen


The answer to your question is yes.
The Apache service named reported the following error:
>>> <Directory "z:/rob"> path is invalid. .

I tried your suggestion. I deleted:
Alias /media/music z:/rob
<Directory "z:/rob">
Order allow,deny
Allow from all
</Directory>

I removed the forward slash and quotations from documentroot. I added your suggestion and there are no errors but I can't see my alias directory on the the web.
Back to top
robbeck



Joined: 06 Aug 2011
Posts: 6

PostPosted: Sat 06 Aug '11 16:46    Post subject: Reply with quote

Kanashii wrote:
Just type in adres bar your aliasname

or make symlink


http://www.rekenwonder.com/linkmagic.htm


I replaced Alias /media/music "z:/rob" in the suggestion above with
Alias http://192.168.0.2:8080/media/music/ "z:/rob"
and I still can't see the z:\rob directory
Back to top
robbeck



Joined: 06 Aug 2011
Posts: 6

PostPosted: Sat 06 Aug '11 16:48    Post subject: Reply with quote

James Blond wrote:
Is that z: drive a networkdrive?


Yes it's a folder on another computer. This must be one of the problems. I changed the alias to a local drive and now I get the following error:
[Sat Aug 06 08:05:43 2011] [error] [client 192.168.0.2] Directory index forbidden by Options directive: D:/Temp/, referer: http://192.168.0.2:8080/media/

BTW thanks to all for replying to my original message.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 06 Aug '11 21:05    Post subject: Reply with quote

If you install apache as service on windows you can't access network drives. You have to create a new user for that and run the apache service with that user.
Back to top
robbeck



Joined: 06 Aug 2011
Posts: 6

PostPosted: Sun 07 Aug '11 3:55    Post subject: Reply with quote

OK I created a new user account and logged off my admin account, logged on as the new user, and I still can't see my z folder on the web. I don't know what else to try. Can the new user be an admin or does it matter?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sun 07 Aug '11 11:17    Post subject: Reply with quote

I really need to dig this faq out of my archives and put it somewhere ... this has just reminded me.

It is not so just you logging in as that user and starting Apache. Especially if you do not want to have to log in under this name and start Apache from the console. You need to set the user of the service as it. Once you have done that (not saying you did not), there is one more thing that must be done.

Say you made a username on the server computer for Apache called simply Apache
On the remote machine, there must also be a user named Apache, and that user must have rights (at least read-only) to the share. That user on the remote computer must also have the same password. It's just like you and remote computer. You have your login name and password on it so you can log into it and get into it from a remote computer on the LAN no?
Back to top
robbeck



Joined: 06 Aug 2011
Posts: 6

PostPosted: Sun 07 Aug '11 23:20    Post subject: Reply with quote

If you could it might be a great help. There are are a lot of folks now streaming from more than one machine, I would think.
Back to top


Reply to topic   Topic: Alias problem View previous topic :: View next topic
Post new topic   Forum Index -> Apache