Page 1 of 1

Err 404 Object not found when installing outside of htdocs

PostPosted: 27. June 2010 03:33
by nick v
Hi,

I'm a complete newbie apache / PHP so I apologies in advance if this is a simple question. I've searched extensively in forums to find a answer to no avail.

I have XAMPP installed on Ubuntu and can access PHPmyadmin without a problem, so my base setup appear to be ok.

I'm trying to install the source code from a book that I am using to learn PHP. I've located the source in my user directory as I plan to use eclipse as my IDE.

I have modified the httpd.conf file and added:

Code: Select all
<IfModule alias_module>
...
    Alias /tshirtshop/ "/home/user/tshirtshop"
    Alias /tshirtshop "/home/user/tshirtshop"
</IfModule>

<Directory "/home/user/tshirtshop">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>


However, when access http://localhost/tshirtshop I get an index listing or if I try http://localhost/tshirtshop/index.php I get Error 404 Object not found.

Thanks in advance for your help.

Re: Err 404 Object not found when installing outside of htdocs

PostPosted: 27. June 2010 11:29
by Nobbie
nick v wrote:
Code: Select all
<IfModule alias_module>
...
    Alias /tshirtshop/ "/home/user/tshirtshop"
    Alias /tshirtshop "/home/user/tshirtshop"
</IfModule>


This is nonsense, even if it works. One Alias will be fine:

Code: Select all
Alias /tshirtshop "/home/user/tshirtshop"


nick v wrote:However, when access http://localhost/tshirtshop I get an index listing or if I try http://localhost/tshirtshop/index.php I get Error 404 Object not found.


Seems there is no index.php - can you show us the contents of the index listing? Or take a closer look on yourself.