First time setting up site on Apache

Discussion in 'Apache' started by DarkMatter2009, Aug 4, 2009.

  1. #1
    Hello All,

    I am relatively new to using Apache, I have recently set it up on Ubuntu. What I'm trying to do is make "/home/yves/MyFirstPHP/MyFirstPHP/HelloWorld.php" accessible through my browser using the URL: http://localhost/MyFirstPHP/HelloWorld.php. The tutorials I have found so far are confusing at best as I tend to digest knowledge better from looking at full examples. If anybody could give me a full example of what I'd put into whichever configure file I'm supposed be working with I will greatly appreciate it.

    Thank you in advance.
     
    DarkMatter2009, Aug 4, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    <VirtualHost 127.0.0.1:80>
    ServerName localhost
    ServerAlias *.localhost
    ServerAdmin webmaster@localhost
    DocumentRoot /home/yves/MyFirstPHP
    </VirtualHost>

    Put that in httpd.conf file and restart apache
     
    Bohra, Aug 4, 2009 IP