Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I've installed Apache 2 on Ubuntu linux 10.04 as a simple LAN site for testing PHP scripts. But even though I've deleted the default index.html file in htdocs, changed ...
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    2

    [SOLVED] Apache won't update htdocs files?

    Hi, I've installed Apache 2 on Ubuntu linux 10.04 as a simple LAN site for testing PHP scripts.
    But even though I've deleted the default index.html file in htdocs, changed the index file to index.php, put an index.php, chmoded to 775, and gave ownership of the folder to my account, it will not update any of the files.
    Any time I go to 127.0.1.1 or 127.0.0.1 (Both work, somehow), it has the "It works!" page instead of the page I put there. And yes, I've tried restarting apache, restarting my computer, etc.
    What's the problem and/or how do I fix it?
    Thanks,
    -Androidnewb321

    tl;dr: Apache keeps displaying the "It works" page even though I've replaced it. How do I fix it?

    PS: YES, THIS WORKS ON WINDOWS. So don't bug me about
    this being an Apache question, it's specific to Ubuntu.

  2. #2
    Linux Newbie JosePF's Avatar
    Join Date
    Jun 2010
    Posts
    225
    Hello,
    Edit /etc/apache2/httpd.conf and, for example, write:

    ServerName localhost
    DocumentRoot /var/www/

    <VirtualHost *:80>
    ServerName (web address, you can put anything if you have not really serving )
    DocumentRoot /var/www/
    </VirtualHost>

    Now, put your index.php in /var/www

    I hope this help you

    Regards

  3. #3
    Just Joined!
    Join Date
    Jul 2010
    Posts
    2

    Thanks

    Thanks, it worked
    Not used to linux quite yet, so thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...