Website directory listing

Discussion in 'General' started by Sydney, Mar 26, 2009.

  1. Sydney

    Sydney New Member

    Hi having problems getting a directory list, all I get is is 403 or 500, have tried Options Indexes in .htaccess file, and also in the mysite.com.vhost file, also http://mysite.com/stats give an error 500 after entering a valid l:p I cannot see anything in the apache2.conf file causing a problem, I am at a loss, please help :( Running ispconfig3 on lenny.
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    If you get an error, then take a look at the error log of the website if you want to know the reason.
     
  3. Sydney

    Sydney New Member

    Yes I did I forgot to post that, I dont understand why it says:

    [Thu Mar 26 21:34:28 2009] [error] [client xx.xxx.xxx.x] client denied by server configuration: /var/www/mysite.com/web/uploads/index.php
     
  4. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Which is the exact ispconfig version?
     
  5. Sydney

    Sydney New Member

    3.0.1, upgraded from 3.0.0.9
     
  6. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Entferne mal die .htaccess Datei, geht es dann?
     
  7. Sydney

    Sydney New Member

    Same error if I remove the .htaccess :(
     
  8. Sydney

    Sydney New Member

    Well I just dont know, one thing to note is that I can list the directory of the main website at /var/www if I remove the index.html, which I will probably want to turn off incidentally...

    Is it just me having this problem?
     
  9. Sydney

    Sydney New Member

    I got it to work, it didn't help me not restart apache after changing the conf files (what a noob!)

    I removed these lines from the vhost file:

    <Files ~ '.php[s3-6]{0,1}$'>
    Order allow,deny
    Deny from all
    Allow from none
    </Files>

    and set allowoverride all (didn't work with allowoverride indexes?)

    I don't think I should, or should need to remove those lines tho, any comment?
     
  10. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    These lines are there because you disabled PHP for the website. If you want to use PHP in a website you will have to enable it of course in the site settings and then these lines will be removed automatically.
     
  11. Sydney

    Sydney New Member

    Yes php is disabled, I'm not planning to use it, by why do I have to remove those lines to get the indexes to work?
     
  12. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    But you tried to access a .php page, so this does not make any sense. if you have .php pages in the websites and want to access thejm, then php has to be enabled. Otherwise the lines have to pe present as it is a security risc to access a .php page with php disabled as it can contain passwords and other security relevant information in cleartext.

    This has nothing to do with indexes.
     
  13. Sydney

    Sydney New Member

    No you have misuderstood, with the php lines removed, I goto http://mysite.com/uploads/ and I get a directory list, which is what I want, however, with the php lines I goto http://mysite.com/uploads/ and I get the error:

    [Fri Mar 27 16:14:08 2009] [error] [client 192.168.1.1] client denied by server configuration: /var/www/mysite.com/web/uploads/index.php

    I do not know why it is looking for index.php :s
     
  14. Sydney

    Sydney New Member

    The php issue seems to have dissolved, but I still cannot understand why I get an options not allowed here error, when I use a .htaccess with "options +indexes", even tho I have allowoverride indexes in the vhost file :mad:
     
  15. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    You can not set options +indexes in a .htaccess files as thos would be a very big security hole. You can set options +indexes instead in the apache directives field of the website.
     
  16. Sydney

    Sydney New Member

    Thanks Till that works, but only if I enable php, otherwise I get the 403 index.php error, when requesting a directory listing for some strange reason...
     
  17. Sydney

    Sydney New Member

    Guess I will have to learn some php :)
     

Share This Page