alias issue, getting 404's

Problems with the Windows version of XAMPP, questions, comments, and anything related.

alias issue, getting 404's

Postby gesangbaer » 24. September 2008 07:22

I've just installed xampp on xp sp2 and I've got the main directory serving files, but I can't get alias's to work. Here is the alias in question.

Code: Select all
   
    Alias "/admin" "C:/Program Files/xampp/htdocs"
   <Directory "C:/Program Files/xampp/htdocs">
       Options Indexes FollowSymLinks Includes ExecCGI
       AllowOverride All
       Order allow,deny
       Allow from all
   </Directory>


I know this is the default xampp directory for the apache files. I changed that to a different directory and it's working fine.

One thing I noticed, when I try "http://url/admin" the 404 page is located at "http://url/xampp".

I also tried

Code: Select all
   
    Alias "/admin/" "C:/Program Files/xampp/htdocs/"
   <Directory "C:/Program Files/xampp/htdocs">
       Options Indexes FollowSymLinks Includes ExecCGI
       AllowOverride All
       Order allow,deny
       Allow from all
   </Directory>


The only difference was that the 404 page url was "http://url/admin".

I can't figure out why this alias doesn't work. Any help would be greatly appreciated.
gesangbaer
 
Posts: 5
Joined: 24. September 2008 07:16

Postby gesangbaer » 25. September 2008 03:52

Nobody has any ideas on this?

Is there any other information I can provide that might help?
gesangbaer
 
Posts: 5
Joined: 24. September 2008 07:16

Postby Wiedmann » 25. September 2008 08:06

and I've got the main directory serving files,

You have changed the DocumentRoot?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby gesangbaer » 26. September 2008 03:11

Yes. I changed the DocumentRoot to xampp/web. The files in that folder are serving up as http://url/ which is great.

I tried to use the original directory as an alias directory so I could still get at the admin files. Sadly the alias is not working.
gesangbaer
 
Posts: 5
Joined: 24. September 2008 07:16

Postby Wiedmann » 26. September 2008 08:33

so I could still get at the admin files.

The "admin files" are only a demo website and not really for administration. So it's also safe to just delete these files.

I changed the DocumentRoot to xampp/web.

This demo website is not desinged to work from an alias (especially the status page).

Making a VHost is a better solution.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby gesangbaer » 27. September 2008 03:22

Okay, but the alias should still work yes? Even if the pages aren't any good. Those pages would show to an outside browser before so they should be able to show up under an alias. Should we just ditch alias's and always use a virtual host?

Ignoring the fact that I shouldn't keep these pages, what can I do to make it work?
gesangbaer
 
Posts: 5
Joined: 24. September 2008 07:16

Postby Wiedmann » 27. September 2008 09:54

but the alias should still work yes?

No:
Code: Select all
Alias "/admin" "C:/Program Files/xampp/htdocs"

In the file "http://localhost/admin/index.php" is a redirect to "http://localhost/xampp/". But this location doesn't exists in your configuration.

Should we just ditch alias's and always use a virtual host?

You can try to make an alias like:
Code: Select all
Alias /admin "C:/Program Files/xampp/htdocs/xampp/"

(In this case the redirect in htdocs does not take effect)

But an VHost is the best solution.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby gesangbaer » 27. September 2008 20:44

Oh! Thanks! I didn't notice that redirect when the files were still up. So the alias was working and it was an invalid redirect that was causing the issue?

Thanks again.
gesangbaer
 
Posts: 5
Joined: 24. September 2008 07:16

Postby Wiedmann » 28. September 2008 10:26

So the alias was working and it was an invalid redirect that was causing the issue?

Correct.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 22 guests