htaccess not working with ISPconfig

Discussion in 'Server Operation' started by comptcarlik, Aug 31, 2008.

  1. falko

    falko Super Moderator ISPConfig Developer

    Can you post it directly here? That makes it easier for us than downloading and unpacking an archive.
     
  2. gamera

    gamera New Member

    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 192.168.1.30:80
    <VirtualHost 192.168.1.30:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.mythicalsystems.com:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.30:80>
    <Directory /var/www/web7/web>
    AllowOverride All
    </Directory>
    ServerName www.mythicalsystems.com:80
    ServerAdmin webmaster@mythicalsystems.com
    DocumentRoot /var/www/web7/web
    ServerAlias mythicalsystems.com
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    Alias /cgi-bin/ /var/www/web7/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web7/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 On
    php_admin_value open_basedir /var/www/web7/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web7/phptmp/
    php_admin_value session.save_path /var/www/web7/phptmp/
    <IfModule mod_ruby.c>
    <Directory /var/www/web7/web>
    Options +ExecCGI
    </Directory>
    RubyRequire apache/ruby-run
    #RubySafeLevel 0
    <Files *.rb>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    </Files>
    <Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    </Files>
    </IfModule>
    <IfModule mod_python.c>
    <Directory /var/www/web7/web>
    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
    </Directory>
    </IfModule>
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web7/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/web7/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web7/user/$1/web/$3
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
    #
    #
     
  3. falko

    falko Super Moderator ISPConfig Developer

    Does your .htaccess work if you disable Python for web7?
     
  4. gamera

    gamera New Member

    Turning python off definitely worked!

    Question is whether or not I will be needing python later on...

    A thousand thanks.
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Ok, then the problem was in
    Code:
    <IfModule mod_python.c>
    <Directory /var/www/web7/web>
    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
    </Directory>
    </IfModule>
    I should probably change
    Code:
    AllowOverride Indexes AuthConfig Limit FileInfo
    to
    Code:
    AllowOverride all 
    I've added this to our bugtracker.
     
  6. public_domain

    public_domain New Member

    ispconfig .htaccess 500

    ***URGENT*** yep! same problem. and its the ONLY problem we have. the htaccess works with Order-Deny-Allow but NOT with the other really "NEEDFUL THINGS" - pun intended! please post what the solution is ASAP. recently using Version: 2.2.33 and it does seem that this happened since that time.
     
  7. comptcarlik

    comptcarlik New Member

    i personally use php login script to protect the folder . that's what i figured out to get the server operating on time
     
  8. public_domain

    public_domain New Member

    ispconfig .htaccess 500

    **update**
    for whatever reason, placing ..
    <Directory "/var/www/webdir#/web/">
    AllowOverride All
    </Directory>
    into the Apache Directives (Optional): was saving but NOT TAKING!! assing the line to the vhost file alone was not enough. i had to both place this into the Apache Directives (Optional) AND manually add the lines!! now it works.
    using ISPCONFIG Version: 2.2.33
    if there is anything you would like me to do to assist in t-shooting this. please let me know.
     
  9. public_domain

    public_domain New Member

    ispconfig V2.2.33 .htaccess 500

    *update*
    now that i have it working, i am doing some tshooting. discovered that the perms on /etc/httpd... all root/root! & 07##. i dont recall looking at this particular directory before but i am pretty sure it should have a better user/write settings like admsipconfig/??? 077#. if this doesnt solve it i will look more.
     
  10. public_domain

    public_domain New Member

    ispconfig V2.2.33 .htaccess 500

    *update*
    made the permissions on directory /etc/httpd/conf/ to 2775. user=admispconfig group={withheld}. again- if there is anything i can do to assist, let me know. thank you.
     
  11. matt082606

    matt082606 New Member

    ISPConfig 2.2.35 .htaccess issue.

    I spent the weekend reloading a webserver to try out ISPConfig. Everything was working before, I just wanted to make adding additional sites easier.

    I am having the .htaccess issue however. All the sites I design I use redirect 404 to index, and NEED this to be the case.

    This was easy to complete before as I added new vhosts.

    Here is what I have tried to get this to work.
    I added AllowOveride All to /etc/proftpd/proftpd.conf EDIT: Sorry this should read /etc/apache2/apache2.conf

    I added them to ISP vhosts individually.

    I added them from the ISP control panel to each site, I verified this went to the ISP Vhosts file as well.

    I am running Ubuntu Server 9.10, installed using the steps here for perfect server and ISPConfig 2.2.35

    I am thinking the next step is to manually point the default in ispconf Vhosts file from /error/fileNotFound.html to index.php hopefully that will get it working, and I will do that for each site needed. Edit2: This didn't work either. I put in the full path to the index file.

    If anyone has found a way to get this working globally please explain it here as reading through this thread it keeps jumping from one users problem to the next without any solutions being posted. If I fix this on my own, or am given a solution that works I will make sure and acknowledge what worked so that future people finding this thread will have a working answer to the question.
     
    Last edited: Feb 22, 2010
  12. matt082606

    matt082606 New Member

    WOW I am a moron.

    After many hours of searching for the problem I realized that my htaccess was pointing to index.html not index.php.

    I fixed it and it is working on all sites. unfortunately all sites utilized a different solution above...

    I will post the results of what works globally, and what works per site, as I clean up my mess.

    Sorry
     
  13. collimic

    collimic New Member

    falko,
    I just updated my ispconfig from 2.2.29 to 2.2.37 Everyhitng was working great. Now the .htaccess files are not working if I have python enabled. Can you tell me what file I need to access so it will change it to AllowOverride All?

    Thank you.
     
  14. collimic

    collimic New Member

    Well I feel bad about the last comment. I did not upgrade I just re installed the same version. But it would be great to know what to modify as I cannot get the upgrade to work just yet.
     
  15. falko

    falko Super Moderator ISPConfig Developer

    What do you mean with that? :confused:
     
  16. collimic

    collimic New Member

    It would be a topic for a new thread but I am running Ubuntu 8.10 and I cannot seam to get libarchive-tar-perl to install. I have installed perl-modules and it is working fine but it is not installing libarchive-tar-perl.

    Any help would be great or I could start a new thread.

    Thank for your help.
     
  17. falko

    falko Super Moderator ISPConfig Developer

    Why? Do you get any error messages?
     
  18. abdi

    abdi New Member

    Till in a case senario like mine where I am running Nginx as a webserver, how do I enable .htaccess for independent sites or globally?
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    .haccess is a apache technology, there is no such function in nginx.

    As a sidenote, this thread is about ispconfig 2. ISPConfig 2 and ispconfig 3 are two completly different server controlpanel, so nothing that you read here in this thread applies to the ispconfig 3 version you use.
     
    Last edited: Oct 29, 2012

Share This Page