D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Programs which start on login

 

Neil Winchurst wrote:
> On Sun, 13 May 2007 18:18:29 +0100
> Neil Williams <linux@xxxxxxxxxxxxxx> wrote:
> 
>> On Sun, 13 May 2007 17:47:30 +0100
>> Neil Winchurst <neil@xxxxxxxxxxxxxxxxx> wrote:
>>
>>>>> I also have all three programs on my own computer (running Kubuntu
>>>>> Edgy). At the moment I have not worked out if it is possible to test
>>>>> any php files which I create, on my own computer.
>> In most cases, simply copying or symlinking the PHP files to /var/www
>> is sufficient for you to view the results at http://localhost/ 
> 
> I have looked at /var/www and there are two folders there,
> apache2-default and phpmyadmin.  Which php gives me /usr/bin/php. So I
> just add a link in /var/www which points to /usr/bin/php. Is that
> correct?

No.

Think of it in the same way as the server for you web site, because 
actually it _is_ the same.

The server for your website has a directory tree in which you place 
files. This tree is then reproduced at www.yourdomain.com.

In the same way, your local version of apache hasn't been told about any 
domains, so is using the default settings, which are to listen to every 
available interface and serve all pages from the directory 
/var/www/apache2-default.

So if you place hello.php in /var/www/apache2-default, you will then be 
able to go to http://localhost/hello.php or http://127.0.0.1/hello.php 
or http://[ip address or hostname of your machine]/hello.php and you 
will get the same thing.

(Though the php parts of the pages will be ignored if php is disabled).

Hope this helps.
Simon

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html