Albion Posted August 11, 2008 Share Posted August 11, 2008 Hello all :)I want to learn PHP5 now and have installed the LAMP stack from the page in the Ubuntu forum (https://help.ubuntu.com/community/ApacheMySQLPHP) but am stuck when it comes to Apache2 to let me run my code from my home folder (~/public_html/site_name, etc). Can anyone help me with this?Thanks in advance.A. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 11, 2008 Share Posted August 11, 2008 What have you tried? What happens when you pull up a PHP script in your browser via localhost? Link to comment Share on other sites More sharing options...
Albion Posted August 11, 2008 Author Share Posted August 11, 2008 I have tried to add folders as virtual named hosts (rather than using IP addresses). I have saved a file with just html and body tags and a line with phpinfo in. The result is: Not FoundThe requested URL /leofcwen/phpinfo.php was not found on this server.Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch Server at localhost Port 80A. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 11, 2008 Share Posted August 11, 2008 It sounds like a config error with Apache, it sounds like the server isn't looking in the location where you're saving your files. Why are you adding virtual named hosts though, why not just start with one site that you can test on and go from there? Link to comment Share on other sites More sharing options...
Albion Posted August 11, 2008 Author Share Posted August 11, 2008 The only reason I chose that was so that I could host my files in my home folder while writing and testing the site. This is not intended to be used in a real-world situation, just for personal use so will be very low traffic. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 11, 2008 Share Posted August 11, 2008 Unfortunately, I don't have any experience configuring Apache 2 on Linux, sorry. Link to comment Share on other sites More sharing options...
Albion Posted August 11, 2008 Author Share Posted August 11, 2008 Thanks for your help thus far I hope someone here can/will help me :)A. Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 12, 2008 Share Posted August 12, 2008 I have that part of my LAMP working. Instead of a virtual host, I use a symbolic link (symlink). For example, to make "/var/www" (the default web directory for typical LAMP) point to "/home/albion/www" (if that's your username) you would use ln -s /home/albion/www /var/www That's what I've done on my own development server, and I've had no problems with it.By the way, if that doesn't help I doubt anyone here knows the answer. As far as I know, I'm the in-house Linux consultant (which is pretty scary, lol). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.