First time here? Check out the FAQ!
0

Unable to start Apache Server-Error in RewriteEngine

I have used the code provided in the deployment section of the documentation, all I have done is change the directly to match with my setup but when start the apache server it fails at line RewriteEngine on

Here is the section:

 RewriteEngine on `this is the line with error`
     RewriteRule /admin(.*)$ https://MY-IP-ADDRESS/admin$1 [L,R=301]
     </LocationMatch>
 CustomLog /var/log/httpd/askbot/access_log common
 ErrorLog /var/log/httpd/askbot/error_log
 LogLevel debug

Here is the error:

* Starting web server apache2                                                                                     Syntax error on line 38 of /etc/apache2/sites-enabled/askbot:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Action 'start' failed.
The Apache error log may have more information.

also I am not sure how to configure following two lines:

#WSGISocketPrefix /path/to/socket/sock
#WSGIPythonEggs /var/python/eggs
SocialQA's avatar
265
SocialQA
asked 2013-03-14 00:15:44 -0600
Fitoria's avatar
1.1k
Fitoria
updated 2013-03-15 22:25:48 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Looks like you don't have mod_rewrite enabled. Probably you're on Debian or Ubuntu which have a pretty modular Apache so you need to check if you actually installed the necessary module.

On CentOS there is a line like this in httpd.conf::

LoadModule rewrite_module modules/mod_rewrite.so

That line will load mod_rewrite and then 'RewriteEngine on' should work as well (assuming of course the module itself is installed).


Felix Schwarz's avatar
31
Felix Schwarz
answered 2013-03-15 17:00:58 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments