Announcement

Collapse
No announcement yet.

rewrite rules for lighttpd

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • rewrite rules for lighttpd

    Hi,

    I have installed EspoCRM under lighttpd + fastcgi. Lighttpd does not support .htaccess files.
    I might just convert rewrite rules into lighttpd configuration, but no very familiar with the syntax. Do you have an example config for lihgttpd?

    for example, default Wordpress redirection in lighttpd looks like the following:

    Code:
    server.error-handler-404 = "/index.php"
    дякую
    Last edited by Yu Chem; 08-07-2014, 03:16 AM.

  • #2
    Hello

    We will look and let you know. The next week.

    Thank you

    Comment


    • #3
      I have played with rewrite rules, there seem no problems to add rewrite rules into lighttpd configuraiton.
      What is impossible is to read HTTP headers (as I understood, you create a new header with the value read from Authentication header in your .htaccess file).

      BTW, EspoCRM incorrectly specifies Location header in HTTP 302 response. An absolute URL must be used according to RFC 2616 while EspoCRM uses relative.

      $ curl -i "http://espocrm.example.com/api/v1/"
      HTTP/1.1 302 Found
      X-Powered-By: PHP/5.5.14
      Location: install/
      Content-type: text/html
      Content-Length: 0
      Date: Thu, 07 Aug 2014 16:40:49 GMT
      Server: lighttpd/1.4.35
      This causes an infinite loop redirection in certain circumstances

      Comment


      • #4
        Diggind deeper, I have found an error in my lighttpd config. Fixing the error resolved the issue. Lighttpd confguration that works in place of .httpaccess file is
        Code:
          url.rewrite-once = (
            "^/api/v1/install" => "/install",
            "^/api/v1/(.*)" => "/api/v1/index.php/$1"i
          )
        first rewrite is not strictky needed, it is only needed to overcome redirection bug stated earlier.

        Hooked the CRM to Amazon's SES for emails. All is working (for now).

        great job guys!
        Last edited by Yu Chem; 08-11-2014, 03:36 AM.

        Comment

        Working...
        X