Results 1 to 15 of 15
  1. #1

    Where to put main page in Apache(Linux)

    Hi, this is my first post here and i am a total newb to any kind of web programming and linux.

    I am trying to learn some html and set up my own web server. I am using Red Hat 9 and Apache 2.0.40 web server, i can start it up an all but i can't find where to put my page.

    The instructions say to put it in /home/httpd but there is no such directory, and it doesnt seem to make sense because there is no user by the name of httpd so i dont know what they mean.

    When i try to connect to localhost, i get the default apache start page.


    I tried changing the DocumentRoot section of the httpd.conf file to the directory of where my page is, but that didn't work.

    I also tried to put my page in the directory that it initially labled, which was "/var/www", but that didn't work either.

    Any help would be appreciated, thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    WebHostingTalk
    Posts
    8,901

    Re: Where to put main page in Apache(Linux)

    Originally posted by Pormon
    Hi, this is my first post here and i am a total newb to any kind of web programming and linux.

    I am trying to learn some html and set up my own web server. I am using Red Hat 9 and Apache 2.0.40 web server, i can start it up an all but i can't find where to put my page.

    The instructions say to put it in /home/httpd but there is no such directory, and it doesnt seem to make sense because there is no user by the name of httpd so i dont know what they mean.

    When i try to connect to localhost, i get the default apache start page.


    I tried changing the DocumentRoot section of the httpd.conf file to the directory of where my page is, but that didn't work.

    I also tried to put my page in the directory that it initially labled, which was "/var/www", but that didn't work either.

    Any help would be appreciated, thanks.
    either

    /usr/local/apache/htdocs

    -o-

    /etc/httpd/htdocs

    Sirius
    I support the Human Rights Campaign!
    Moving to the Tampa, Florida area? Check out life in the suburbs in Trinity, Florida.

  3. #3
    Thx for the quick response, ill go try it out.

  4. #4
    Those directories did not exist. I tried looking through all the files and directories that resulted from "locate httpd" and i couldnt find anywhere i could put my page.

    I also tried "locate htdocs" to see if the folder was somewhere else, and it came up with no results.

    But like i said im new to linux, not sure if locate even finds folder names.

  5. #5
    Join Date
    Oct 2003
    Posts
    293
    /var/www/html, not /var/www

  6. #6
    Try 'updatedb' before 'locate htdocs'.

  7. #7
    Join Date
    Aug 2003
    Location
    Pittsburgh
    Posts
    3,490
    That reminds me.. is there a decent alternative to locate and whereis?

  8. #8
    Originally posted by saminuske
    That reminds me.. is there a decent alternative to locate and whereis?
    Alternative .. perhaps not. find works quite well though.

  9. #9
    I put it into "/var/www/html" and it still wouldnt show up. I double checked the config file and it said that DocumentRoot was /var/www/html.

    One thing I was a little confused on was that on the test page that shows up it says I can replace that page, so wherever I have to put it there must be that page there somewhere. And the only thing in the html dir is another dir called "usage".

  10. #10
    Join Date
    Oct 2003
    Posts
    293
    hey, just delete what's so ever in /var/www/html, and put your pages in.

    or create a new folder under /var/www/html, and put your things in it.

  11. #11
    Allright, i did that, now the test page isn't showing up anymore, but instead im getting an access forbidden, 403 error. Not sure what that means. I also named the page index.html, and that seemed to do it.

  12. #12
    Join Date
    Oct 2003
    Posts
    293

    Re: Re: Where to put main page in Apache(Linux)

    Originally posted by sirius
    either

    /usr/local/apache/htdocs

    -o-

    /etc/httpd/htdocs

    Sirius
    is this for cpanel?

  13. #13
    I changed the page name to something other then index.html and the default apache page came back up again. So i put it back to index.html and im still getting the 403 error. This is really getting anoying. I just want to post my dang page!!!!!

  14. #14
    Join Date
    Oct 2003
    Posts
    293
    hire a server admin to do it for you, i think you are not ready to server web pages yet.

  15. #15
    check folder permissions...

Posting Permissions

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