problems creating aliases.
Posted 28 October 2006 - 12:32 AM
I am trying to add aliases to my config file so I can follow along with Beg. PHP5 and MySQL E-Comm. I'm trying to add this
Alias /tshirtshop/ "c:/tshirtshop/"
Alias /tshirtshop "c:/tshirtshop"
But when I restart Apache(I'm using 2.0.59 by the way) and try to test I get an error page. I also have a test.php file that I'm trying to call. So my "url" is http://localhost/tshirtshop/test.php
Can someone give me a hand asap I really need this help fast, Im buiding a site and learning as I go starting off real good as you can see.
Now I have maybe fixed something. I rewrote the php code in Dreamweaver so now I don't get the 404 page cannot be found. Now I get a blank page. With this code if all is working properly should I see the php icon?.....
Cause like I said before rewriting the code I was getting an error page(notepad adding the .txt after .php) but now there's nothing displayed on the page. Even if I do a simple Hello World basic php script nothing get's displayed.
Any answers? I can email the config file if that will help.
Posted 28 October 2006 - 10:56 AM
You need to setup Apache to parse PHP files with the PHP Interpreter. I have posted a few posts in this forum how to do this, such as this post.
Posted 29 October 2006 - 12:31 AM
Thanks for the reply. I did get it to display my php code which was just a date test if you will. But my main problem seems to be getting it to use an "aliase" I think. Right now what works is http://localhost/date.php, but the date.php file is in a folder called prorider. If I put http://localhost/prorider/date.php I get the usual cannot find page error. I've even tried http://prorider/date.php same message.
From what I think is that apache isn't recognizing that I have made prorider the "default" folder. Excuse me if my names or terms are wrong. Root folder is the correct way of putting it I guess. In the tutorial I was following we were supposed to add an alias in apache's config file which would be used as the virtual root folder(once again terms probably wrong).
Posted 29 October 2006 - 12:43 PM
Then you need to have a corresponding directory directive, like so:
Directory saettings here
For example for the tshirtshop alias you'll need this:
Alias /tshirtshop/ "C:/tshirtshop/" <Directory "C:/tshirtshop"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory>Now save the httpd.conf and restart Apache. Now put your files in C:\tshirtshop and go to http://localhost/tshirtshop/
You should now see the files you have just placed in C:\tshirtshop or your index file will load up automatically.
Posted 29 October 2006 - 05:29 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users