Find the answer to your Linux question:
Results 1 to 8 of 8
Hope someone can help me again... I managed to run apache on andrake 8.1 But.. does anyone know which is the default directory I should upload the webpage html files ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    26

    Where should I stick the webpage files for apache... -.-


    Hope someone can help me again...

    I managed to run apache on andrake 8.1
    But.. does anyone know which is the default directory I should upload the webpage html files into?

    Alternatively, could someone point out to me where the configuration file for apache is.. then i think i can vi it to try to see where the difrectory is....

    thx...

  2. #2
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Barrie, Ontario
    Posts
    219
    Code:
    /etc/httpd.conf
    /etc/httpd/httpd.conf
    /usr/local/apache/conf/httpd.conf
    Are the first three places to look... Failing that, use 'locate httpd.conf' and see if that knows where it is. Once you find the file, the fastest way to find out where your web pages should go is:
    Code:
    grep DocumentRoot /path/to/httpd.conf
    Blog - KB5UMQ - Linux User #272983
    3 Rules:
    1) "It doesn't work..." is simply not useful information.
    2) Don't cross post!
    3) If you are asking for help, start by telling us your distro/os and version.

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Posts
    26
    ok i found the httpd.conf file as you suggested..!

    but.. there is no "DocumentRoot" setting in the conf file.....
    i checked it with the vi editor and the grep command you provided...

    --- wher eis a logical place to stick this directory?
    --- coul dyou suggest a good syntax and placement for this DocumentRoot setting in the conf file?

    I'm googling for an example at the moment, but i am hoping for a confirmation froma 2nd opinion...

    thanks!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Barrie, Ontario
    Posts
    219
    Generally, somewhere in /var, such as /var/www/html, or /var/htdocs. I host a lot of sites on each of my servers, so I actually have a dedicated mount point for them: /data. Here's a sample of my filesystem:
    Code:
    /data
       /www
          /kodekrash.com
             /www
             /temp
       /log
          /kodekrash.com
             /www.log
             /temp.log
    and httpd.conf:
    Code:
    <VirtualHost *&#58;80>
       ServerName    www.kodekrash.com
       ServerAlias   kodekrash.com
       ServerAdmin   host@tictek.net
       DocumentRoot  /data/www/kodekrash.com/www
       CustomLog     /data/log/kodekrash.com/www.log combined
    </VirtualHost>
    
    <VirtualHost *&#58;80>
       ServerName    temp.kodekrash.com
       ServerAdmin   host@tictek.net
       DocumentRoot  /data/www/kodekrash.com/temp
       CustomLog     /data/log/kodekrash.com/temp.log combined
    </VirtualHost>
    If you have a few sites, you might want to consider doing something similar, but say under /var/sites instead of /data.
    Blog - KB5UMQ - Linux User #272983
    3 Rules:
    1) "It doesn't work..." is simply not useful information.
    2) Don't cross post!
    3) If you are asking for help, start by telling us your distro/os and version.

  6. #5
    Just Joined!
    Join Date
    Mar 2005
    Posts
    26
    thanks! ill give that a shot

  7. #6
    Just Joined!
    Join Date
    Apr 2005
    Posts
    5

    403 Forbidden You don't have permission to access /index.htm

    I am an Apache/linux newbie. (Trying to learn this technology...)

    I setup a Mandrake 10.1 server, and am trying to setup virtual hosting.

    I created a user and a www folder. Set the www folder permission to 777.
    I created a virtual server as follows:

    <VirtualHost *>
    DocumentRoot "/home/domain/www"
    ServerName *.domain.com
    <Directory "/home/domain/www">
    allow from all
    Options +Indexes
    DirectoryIndex index.html index.htm default.htm
    </Directory>
    </VirtualHost>

    I added the DirctoryIndex line, but get the same error with or without that line.

    If I try to browse any file including the root site, I get the following error message:

    Forbidden
    You don't have permission to access /index.htm on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    I'm assuming that this is a permission based issue, however I have 777 permissions set, so it should work. Any help would be appreciated!

    Is there a better way to do this? I want to be able to have multiple sites, and each site needs ftp access to only their directories.

    Thanks!

  8. #7
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    if it's apache2 that you are using, the DocumentRoot variable is actually in the default-server.conf file (in the same directory as the httpd.conf) try
    Code:
    grep DocumentRoot /path/to/default-server.conf
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  9. #8
    Just Joined!
    Join Date
    Apr 2005
    Posts
    5

    permissions

    I got this to work by giving the /home/domain directory the 777 permissions. My problem now is that this keeps reverting back to the secure settings. I've changed this in the security so that it won't change the user directory permissions, but obviously I didn't do it correctly.

    Can anyone assist?

Posting Permissions

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