Protection - Mod_Rewrite

Discussion in 'Setting-up protection' started by headeagle, Jan 23, 2006.

  1. headeagle

    headeagle New Member

    Joined:
    Jan 18, 2006
    Messages:
    3
    Alright folks - For those of you who have had issues getting the Mo_Rewrite to work on your Host/server. Here is some things you need to look at.

    In Section #1 of httpd.conf at:
    Dynamic Shared Object (DSO) Support
    You need to have an entry in the Load Modules that looks something like this:
    LoadModule rewrite_module /usr/lib/apache/modules/mod_rewrite.so

    In Section #2 of httpd.conf at:
    You need to make sure that the Directives are set to something like this:

    DocumentRoot "/var/www/htdocs"
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>

    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

    Teh above example is for those of you who have direct access to your servers httpd.conf file and host more than one Domain for hosting, which means you have Virtual Domains and use Vhosts to tell the server where to look for files and directives for that domain.

    once you have verified that those items are correct or installed on the system you will need to add a couple of lines to your Vhost file in order to allow Apache and Amember to allow access to .htaccess files.

    In your Vhosts file of the Domain you are working on, add the following line under Server Alias or change what is neccessary.

    ServerAlias mydomain.com

    <Directory /my/path/public/www.mydomain.com/htdocs>
    AllowOverride All
    </Directory>

    At the command line type in:

    apachectl configtest
    Make sure there are no errors before restarting Apache

    If no errors - Type in:
    apachectl restart or apachectl stop, then apachectl start

    Once all the above is done, then go back into Amember CP, then to Protect Folders, choose the folder to Protect, all your options should now be available.

    As a host, I have the server pretty well locked down, so as to prevent hacks into the system. Thus I was limited in my protection options through Amember - specifically new-rewrite.

    When I installed Amember onto the system, I ran into the issue of Mod_rewrite and New_Rewrite not working. So, I had to do a bunch of research to get this working. Thanks in part to the team at Amember and of course Google.

    Now the above solutions is what I had to verify and add or change to make it work. Alex know what the problem was and told me exactly what I needed to know to fix the problem i had, but obviously he did not know the lay out and security messures employed on my server, so could not help me in my quest to solve the problem. Through google, I was able to figure aout what I needed and was missing, to get it to work correctly. That being said, this is not a cure all for all issues, but it will get you pointed in the right direction and hopefully save you alot of debug time.

    As always, your mileage may very. Use at your own risk.

    Regards,

    Headeagle
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Headeagle,
    thank you very much for your detailed instructions!
  3. radmanmike

    radmanmike New Member

    Joined:
    May 6, 2004
    Messages:
    14
    help with vhost

    Here is my virtual host info that I added and I can't seem to get it to work. My server will not start back up. I was able to make the other changes no problem. When I edited my virtual host with the lines it will not start. Can someone understanding let me know what I am doing wrong.

    I am running it on a windows 2003 server.

    Thanks
    #
    # Use name-based virtual hosting.
    #
    NameVirtualHost *:80

    ServerAlias kmr-studio.com

    <Directory /xampp/xampp/www.kmr-studio.com/htdocs>
    AllowOverride All
    </Directory>
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    You would better send your entire httpd.conf to us via helpdesk for inspection.
  5. radmanmike

    radmanmike New Member

    Joined:
    May 6, 2004
    Messages:
    14
    Thanks on its wasy

Share This Page