allowoverrides / options problem

Discussion in 'Installation/Configuration' started by Daisy, Jan 2, 2007.

  1. Daisy

    Daisy New Member

    FC5. Just trying to figure out how to use .htaccess with ISPconfig. Everything I've found in the forums so far hasn't worked.

    I added:
    Code:
    <Directory /var/www/web15/web/>
      AllowOverride All
    </Directory>
    to the Apache Directives field and checked and verified that it was in /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf so it should be working right? Then all I should have to do is say... add Options +Indexes or whatever to a htaccess file and should work right? I check the error log and it shows "Directory index forbidden by Options directive: /var/www/web15/web/" What am I doing wrong?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Normally it shold work like this. Have you tried to remove the slash at the end of the path? If you want to allow this for all websites, you can change the ISPConfig default at the end of your apacahe.conf or apache2.conf file, there is a directory directive for /var/www/*/web
     
  3. Daisy

    Daisy New Member

    Tried both, neither worked. And WHY does the stupid index.html keep showing up in my web directory no matter how many times I delete it? GRRRRRRRRRRR.

    p.s. I assumed you were talking about /etc/httpd/conf/httpd.conf. Is that the right file to be modifying for ispconfig?

    Code:
    <Directory /var/www/*/web>
        Options +Includes +Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    <Directory /var/www/*/user/*/web>
        Options +Includes +Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    Are there supposed to be two AllowOverrides? I'm not sure that's standard syntax for apache but could be wrong...
     
    Last edited: Jan 2, 2007
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, if thats your main apache configuration file.

    They are for two different directories, one for the websites and the second for the user websites. The syntax is correct for both.

    You can try to change:

    <Directory /var/www/*/web>
    Options +Includes +Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>

    to:

    <Directory /var/www/*/web>
    Options +Includes +Indexes
    AllowOverride All
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>

    and restart apache.
     
  5. Daisy

    Daisy New Member

    Tried that. no change. Suggestions?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Are you sure that you access the website in the correct directory and that you access it trough the domain and not trough the IP address? Has this website existed on the server before you installed ISPConfig?
     
  7. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    And did you restart apache?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    What's in Vhosts_ispconfig.conf?
     
  9. Daisy

    Daisy New Member

    yes. directory is correct. I'm having this problem with every site. I can not use .htaccess on any. not using IP using domain. (IP wouldn't work with virtual hosting.) this site did not exist before. this is a clean install of FC5 with ispconfig using the perfect setup.
     
  10. Daisy

    Daisy New Member

    LOL. Yeah. Wouldn't do much good to have a new config if you didn't load it eh...? (Though I've made that mistake in my past... *smirks*)
     
  11. Daisy

    Daisy New Member

    Code:
    ######################################
    # Vhost: photos.mysite.com:80
    ######################################
    #
    #
    <VirtualHost 192.168.69.70:80>
    <Directory /var/www/web16/web/>
      AllowOverride All
    </Directory>
    ServerName photos.mysite.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web16/web
    DirectoryIndex index.php
    ScriptAlias  /cgi-bin/ /var/www/web16/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web16/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php3>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php4>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode Off
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web16/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web16/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web16/user/$1/web/$3
    </VirtualHost>
    #
    #
    
    ok. so the allowoverrides is there... why isn't it working. I even manually restarted httpd.
     
    Last edited: Jan 16, 2007
  12. falko

    falko Super Moderator ISPConfig Developer

  13. Daisy

    Daisy New Member

    Adding the Options directive to the <directory> structure curcumvents the need for an .htaccess file. The AllowOverride directive is what allows apache to search for .htaccess to see if the commands in the .htaccess are allowed to override earlier config directives. It's more versatile.

    http://httpd.apache.org/docs/2.2/mod/core.html#options

    Options is not necessary in order to use AllowOverride. You should be able to place AllowOverride in directory and then use .htaccess for Options. I don't think it's an ISPconfig issue because it's showing up in the vhosts. I'm just not sure why apache isn't seeing it. I'll debug and see what I can find out.
     

Share This Page