Suse 9.3 And ModReWrite

Discussion in 'Server Operation' started by marketingmaven, Aug 17, 2005.

  1. marketingmaven

    marketingmaven New Member

    Hi everyone,

    I am new the the Linux environment, but I have installed ISPConfig, and it has made my life a lot easier with operating my new Linux Box.

    I am installing WordPress sites on the box, and one of the options I need is to enable Mod ReWrite.

    I have Apache and everything else installed right as per the Suse 9.3 install faq on the ISPConfig site, but I am not sure how to enable it. Do I enable it on the server in httpd.conf or do I do it in ISPConfig for each site with the Apache Directives option (which I dont know how to use either)?

    Anyway, everytime I try to invoke anything to do with Mod ReWrite with WordPress, the WordPress site no longer works until I delete .htaccess. Please help. I really am not sure what to do, or how to do it. Thanks in advance.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    From the howto:

    Then mod_rewrite is enabled.
    You can then define rewrite conditions/rules in an .htaccess file, in the Apache Directives field in ISPConfig or by using the forward mechanism for Co-Domains (forwarding uses rewrite rules).
     
  3. thevinster

    thevinster New Member

    Similar problem on Wikka

    I'm trying to install Wikka, and the .htaccess file reads:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.*/[^\./]*[^/])$ $1/
    RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
    </IfModule>


    This keeps giving me a 403 error. It looks like a common problem, along with the people trying to set up Drupal.

    Any suggestions?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Have a look at this thread: http://www.howtoforge.com/forums/showthread.php?t=38
     
  5. marketingmaven

    marketingmaven New Member

    Thanks Falko. I guess I did that when setting up ISPConfig, just didnt know how to activate it. So let me see if I understand this. I dont actually upload a .htaccess file to the directory I need it in, I just set the define the rewrite rules in a .htacces file and put that file in the Apache Directives Field? Thanks in advance. :)

    Oh, I need the .htaccess in a subfolder of the main site it seems. Do I still put the .htaccess file in the Apache Directives Field? When I upload the .htaccess file directly to the subfolder, the site fails. When I delete it, everything is fine again. Thanks.
     
    Last edited: Aug 17, 2005
  6. thevinster

    thevinster New Member


    Falko,

    That is the thread I was referring to in my post. I still don't completely understand how to modify the .htaccess system for these scripts. I am currently having trouble with Helpcenterlive as well.

    The .htaccess file reads:

    php_value upload_max_filesize 128M
    php_value post_max_size 128M
    LimitRequestBody 134217728


    Only if I delete the .htaccess file is it working.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you tried to put exactly this

    Code:
    php_value upload_max_filesize 128M
    php_value post_max_size 128M
    LimitRequestBody 134217728
    in the apache directives field of the ISPConfig site?
     
  8. thevinster

    thevinster New Member

    Hi Till,

    Yes I have. It works of course. But if I wanted to isolate those instructions to one particular directory, say /home/www/web150/web/seperate_directory, how would I do that?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Like this:

    Code:
    <Location '/seperate_directory'>
      php_value upload_max_filesize 128M
      php_value post_max_size 128M
      LimitRequestBody 134217728
    </Location>
     
  10. thevinster

    thevinster New Member

    Perfect!

    Many thanks for this. ISPConfig is such an extremely useful piece of software, even if you're managing just one site on it.
     
  11. marketingmaven

    marketingmaven New Member

    Hi,

    Anyone have a answer for my question from my original question on how to use the Apache Directive if I need .htaccess for a subfolder? I am new to this and am not sure exactly what to do and how to do it. Thanks. I guess I need to understand how to use the Apache Directive for both the root folders and subfolders. If someone could explain how to use it to me, I would appreciate it.
     
  12. falko

    falko Super Moderator ISPConfig Developer

    You can copy your .htaccess file to the Apache Directives field (you must use the <Location> directive if your directives are meant for a subdirectory only), or you can use the .htaccess file itself. If you get an error, then something is wrong with your .htaccess file.
     
  13. marketingmaven

    marketingmaven New Member

    Hi Falko,

    Can you do me a favor and give me a example of how to do this? Like I said, Linux is new to me, and I'm amazed I got this far with ISPConfig. I am trying to copy and paste the contents of the .htaccess file into the Apache Directives field, but the site is still not working. I know when Wordpress creates the .htaccess file, it puts in in a sub directory. I don't understand how to place it there, or how any of this works. Could you please give me a example? Thank you.
     
  14. falko

    falko Super Moderator ISPConfig Developer

    Like here:

    Code:
    <Location '/seperate_directory'>
      php_value upload_max_filesize 128M
      php_value post_max_size 128M
      LimitRequestBody 134217728
    </Location>
    This means that these directives are valid only for the directory seperate_directory in the site's document root.
     

Share This Page