LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache2 how install mod_rewrite ? (https://www.linuxquestions.org/questions/linux-server-73/apache2-how-install-mod_rewrite-586100/)

stefane321 09-20-2007 11:46 AM

Apache2 how install mod_rewrite ?
 
My Apache2 is on a Fedora

It is installed here:
/etc/httpd

Modules are in:
/etc/httpd/modules

I searched a lot but I did not found how to install mod_rewrite.

I want to do url rewriting.

Can you help me please?

Sachin.Verma 09-22-2007 06:31 AM

Quote:

how to install mod_rewrite.

yeah ! the specification you have provided here tells you have installed apache with rpm, right ? i guess you really don't have to install anything else.. try to check what modules are there with ur apache, mod_rewrite must be there.

If you've compile apache, the same can achieve by providing option –-enable-rewrite.

http://linuxadministration.wordpress...figure-apache/

stefane321 09-23-2007 10:28 AM

Yes I installed Apache with rpm file

In /etc/httpd/modules I found the file mod_rewrite.so

Now how do I activate it?

Thanks!

MJWhiteDerm 09-23-2007 11:16 AM

yast under 9.3 vs 10.1
 
Stefani,

I am running my host under ubuntu ... but I have another box running Suse 10.1 and I remember that a lot of the functions for apache were accessible with gui tools under 10.1. It might be easier to fix under Suse 10.1 than under 9.3.

Michael

stefane321 09-23-2007 12:06 PM

My server is on a Fedora Core.

MJWhiteDerm 09-23-2007 12:26 PM

Oops. Sorry ..

Good luck. I last played with RedHat 9.0 .. before migrating. When they decided not to support the individual user, I decided to migrate.

I will follow this with interest, however.

Michael

stefane321 09-23-2007 05:29 PM

I fixed the problem like this.

I added this line to etc/httpd/conf/httpd.conf :

Code:

RewriteEngine on
And at he line :

Code:

# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#  Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
    Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#  Options FileInfo AuthConfig Limit
#
    AllowOverride all

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>

I changed:

Code:

    AllowOverride none
To:

Code:

    AllowOverride all


All times are GMT -5. The time now is 06:24 PM.