Access Subdirectories in Apache 1.3.33

Discussion in 'Linux & BSD' started by arew264, May 1, 2005.

  1. arew264

    arew264 OSNN Junior Addict

    Messages:
    36
    Hey everybody, I'm running Apache on an old linux box I made, and I've hit a snag trying to get a forum to work on it. How would one go about letting clients access subdirectories in the main site directory? My main directory is /var/www and I want to allow access to /var/www/cgi-bin and /var/www/forum. I just don't understand how to make it work. Instead of letting me access the folders, I get a 403 forbidden error. Any help would be appreciated.
     
  2. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    echo Options Indexes >> /var/www/.htaccess
     
  3. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    Or.. Put somthing in the respective directories that apache can serve
     
  4. arew264

    arew264 OSNN Junior Addict

    Messages:
    36
    OK, I can now access subdirectories in my server. Now I have another problem. I'm trying to install the simple machines forum on it, and I have installed the debian libapache-mod-php4_4.3.10 file, but whenever I go to /finalforum/install.php to start the install, I get the option to download the file. WHat am I doing wrong that it doesn't just open it?
     
  5. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    add this to your httpd.conf

    AddType application/x-httpd-php .php .php3
    AddType application/x-httpd-php-source .phps
     
  6. arew264

    arew264 OSNN Junior Addict

    Messages:
    36
    Sorry, that doesn't seem to do it. If I put it at the top of the file, it says thats it's an invalid command, si I moved it to the bottom and it works but still asks to download the file instead of loading it. I just don't get it. I also had one other complication, and that is that, since I'm using a damn small linux computer, I use debian packages. WHen installing the libapache-php package, I kept getting an exit error 1 (whatever that is) and when I tried to install php4, it said it required it and quit. I had to uninstall whatever was there of libapache to stop php from trying over and over to reinstall it, install php and skip the dependencies, and reinstall libapache. It worked perfectly wieh I reinstalled libapache, and that puzzles me. at any rate, they both appear to be fine. Again, I would really appreciate any further help you could give me to get Apache to let me load the PHP webpage.
     
  7. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    I'm not too familiar with debian packages, but you need to find some way of tracking dependancies as well.

    exit error 1 is usually preceeded by a mass of other text that tells you what went wrong.
     
    arew264 likes this.
  8. arew264

    arew264 OSNN Junior Addict

    Messages:
    36
    There was nothing saying what went wrong, but as an FYI I am currently reinstalling Apache, MySql and PHP4 from binary packages (MySQL from RPM) because all documentation is based on binary packages and not debian's port. THanks for your help, I'll post again soon.