Results 1 to 9 of 9

Thread: Installing mod_rewrite After apache installation OR re-installing Apache?

  1. #1
    Join Date
    Mar 2009
    Beans
    41

    Installing mod_rewrite After apache installation OR re-installing Apache?

    hi,

    I downloaded apache2 from their website's links, and have it up and running along with PHP on an ubuntu box.

    I thought mod_rewrite was installed by default but it looks like it wasnt as mod_rewrite.so is not in my /modules directory.

    So: is there any way to install the rewrite module now without re-installing Apache2?

    If not: how do I properly reinstall Apache2? last time I didnt remove it properly and had 2 installations of apache running on my machine, not good.
    And, if I reinstall apache2 with the rewrite module, would I have to reconfigure/reinstall PHP as well?

    Thanks

  2. #2
    Join Date
    May 2005
    Location
    Lyon, France
    Beans
    916
    Distro
    Ubuntu Development Release

    Re: Installing mod_rewrite After apache installation OR re-installing Apache?

    sudo a2enmod rewrite to check that if it is installed
    James Dupin
    IT contractor
    Project delivery specialist
    http://fr.linkedin.com/in/jamesdupin

  3. #3
    Join Date
    Feb 2007
    Location
    Nagoya, Japan
    Beans
    343
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    Re: Installing mod_rewrite After apache installation OR re-installing Apache?

    I downloaded apache2 from their website's links
    Why didn't you used the repositories?

    Just install "apache2" and make a symlink from
    /etc/apache2/mods-available/rewrite.load to /etc/apache2/mods-enabled/

    That will do it.
    Servers: Hardy(x4), Lucid(x6);
    Workstations: Quantal(x2), Lucid(x1);
    WM Flavors: Xubuntu(x3)
    Save Energy

  4. #4
    Join Date
    Mar 2009
    Beans
    41

    Re: Installing mod_rewrite After apache installation OR re-installing Apache?

    Hi,

    a2enmod is an unrecognized command.

    I installed it from their website b/c I want this test server to be as similar to the actual server im using, which isnt running on Ubuntu.

    So is there no way to install the mod without reinstaling apache?

    How do I re-install Apache, without ending up with 2 installations?

  5. #5
    Join Date
    Jun 2007
    Location
    Germany
    Beans
    88

    Re: Installing mod_rewrite After apache installation OR re-installing Apache?

    I still don't get why you not just use the repository... Who cares about the distribution. But maybe here is something you can use:

    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
    tbaumi's tech blog - Howto’s for Linux, Windows, OSX

  6. #6
    Join Date
    Mar 2009
    Beans
    41

    Re: Installing mod_rewrite After apache installation OR re-installing Apache?

    i want it to be like the production server im using as much as possible.

    for example, since I have to manually install this mod on apache, I now know that it has to be installed on the production server as well. If I didnt use it, i would still be under the impression that the rewrite module came preinstalled.

    Thanks again, and any info on how to properly reinstall it would be appreciated.

  7. #7
    Join Date
    Feb 2007
    Location
    Nagoya, Japan
    Beans
    343
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    Re: Installing mod_rewrite After apache installation OR re-installing Apache?

    Search if you have already mod_rewrite.so in your system. If so, add this to your apache conf:

    LoadModule rewrite_module modules/mod_rewrite.so

    If you don't have it, you may need to do it as DSO. Check this page:

    http://httpd.apache.org/docs/2.0/dso.html

    I hope this can point you in the right direction.
    Servers: Hardy(x4), Lucid(x6);
    Workstations: Quantal(x2), Lucid(x1);
    WM Flavors: Xubuntu(x3)
    Save Energy

  8. #8
    Join Date
    Mar 2009
    Beans
    41

    Re: Installing mod_rewrite After apache installation OR re-installing Apache?

    Hi,
    It looks like modules have to be compiled at install..I cant find anywhere that shows how to install the module after apache is installed.

    I ended up re-compiling apache and reinstallng it.

    Can you answer one thing though pls? To remove the old installation I just deleted the apache2 directory. Is this the correct way to uninstall it? I installed it by downloading the source from apache's website and compiling/installing, NOT from the repositories.

    Thanks.

  9. #9
    Join Date
    Feb 2007
    Location
    Nagoya, Japan
    Beans
    343
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    Re: Installing mod_rewrite After apache installation OR re-installing Apache?

    You can uninstall any compiled application if you use "checkinstall". If you still have your compiled sources (where you did make install), then, you can still do it:

    1. install checkinstall.
    2. run checkinstall in that directory
    - It will generate a .deb file
    3. install that .deb file

    Anytime you want, you can remove it from aptitude/synaptic/dpkg and will remove all the files that were installed.
    Servers: Hardy(x4), Lucid(x6);
    Workstations: Quantal(x2), Lucid(x1);
    WM Flavors: Xubuntu(x3)
    Save Energy

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •