Problem with .htacess and web server

Discussion in 'Developers' Forum' started by kings, Aug 26, 2009.

  1. kings

    kings New Member

    I'm administrator of web and e-mail server built on a Mandriva 2009.0( 64-bit) and ISPConfig 2.2.32
    On this server is hosted sites built only based on Joomla 1.5. I can’t find where is the problem with the file named (.htaccess ). WEB server with this file stops working and ignore it. At the moment it was renamed .htaccess on htaccess.txt everything goes normally. But in this case the SEO Joomla optimization is lost. Please, help me to solve this problem.
     
  2. falko

    falko Super Moderator

    Any errors in the web site's error log or the overall Apache error log?
     
  3. madmucho

    madmucho ISPConfig Developer

    directive

    For joomla sites i use this Apache Directive and they works ok.

    Code:
    <Directory /var/www/webxx/web/>  
    Options +Includes +FollowSymlinks -Indexes  
    AllowOverride All  
    Order allow,deny  
    Allow from all  
    <Files ~ "^\.ht">  
    Deny from all  
    </Files>  
    </Directory>
    Your enviroment works ok and now you have this problem? Or this problem is after ISPConfig installation?
     
  4. kings

    kings New Member

    Problem with .htaccess

    Thank you! BUT I have new question:
    Is necessary to make similar changes in remaining sections in httpd.conf such as <Directory /var/www/*/user/*/web> and <Directory /var/www/*/cgi-bin>?
     
  5. madmucho

    madmucho ISPConfig Developer

    for all

    as you want you can change global settings for vhosts to accept .htaccess directives or do it per site in ispconfig system, best practice is dont allow users .htaccess if they dont need it or dont know what that is :) that is for security reason.

    Global directive can be placed in..
    Code:
    /etc/httpd/conf/httpd.conf
    at the end of file

    Code:
    <Directory /var/www/*/web>
        Options +Includes +FollowSymlinks -Indexes
        AllowOverride All
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    For Joomla that will be enough. But that is not recomended setting...
     
  6. kings

    kings New Member

    Re broblem with .htaccess

    Special thanks!
    When i make this chages in /etc/httpd/conf/httpd.conf result is FULL ZERO.Apache stoped imediately in log file - not eny trace for reason of stop. Falko sayd Quote"Any errors in the web site's error log or the overall Apache error log" end quote
    When I put this <Directory /var/www/*/web>
    Options +Includes +FollowSymlinks -Indexes
    AllowOverride All
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>

    in /etc/httpd/vhost/Vhosts_ispconfig.conf
    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 192.168.1.2:80
    <VirtualHost 192.168.1.2: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>

    :)<Directory /var/www/*/web>
    Options +Includes +FollowSymlinks -Indexes
    AllowOverride All
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>:)
    #
    #
    ######################################
    # Vhost: www.example.com:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.2:80>
    and etc code...

    IT IS WORK FULL. APACHE DON"T STOP. YOU CAN TO CHANGE htaccess.txt
    to .htaccess!

    THANK YOU MADMUCHO
     
  7. madmucho

    madmucho ISPConfig Developer

    This location isnt good, this directive will be overwriten nextime when you make changes in ispconfig web managment. This vhost directives is generated.

    Try put that directive at end of httpd.conf and then in console httpd -t for syntax check.
     
  8. kings

    kings New Member

    Ok
    Thank you I put on httpd.conf
     

Share This Page