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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
SocialQA's avatar
265
SocialQA
asked 12 years ago
Fitoria's avatar
1.1k
Fitoria
updated 12 years ago

Comments

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).


To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Felix Schwarz's avatar
31
Felix Schwarz
answered 12 years ago
link

Comments

see more comments