mod_rewrite in Apache Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • groupewibi
    Junior Member
    • May 2014
    • 7

    mod_rewrite in Apache Server

    On installation, i get an error message saying than Mod_Rewrite is not activated.
    Actually, mod_rewrite is activate, but it's throught Cgi, like most of the share hosting server.
    Is there is any way to pass by this issue ?

    B Regards,


    1. a2enmod rewrite 2. service apache2 restart
  • tarasm
    Super Moderator
    • Mar 2014
    • 573

    #2
    I hope you have the latest version of EspoCRM (1.0-rc4).
    Please, open this URL http://<espo-url>/api/v1/Metadata. What HTTP status response do you get? 200, 401?
    Job Offers and Requests

    Comment

    • groupewibi
      Junior Member
      • May 2014
      • 7

      #3
      Hey. Got a 404, not found.
      "/api/v1/index.php was not found on this server."

      Comment

      • tarasm
        Super Moderator
        • Mar 2014
        • 573

        #4
        It looks like your .htaccess file can't rewrite the URLs. Could you send me a server information (like apache, PHP version, etc.)
        Also, you could try to change the .htaccess file in api/v1/.htaccess.
        Job Offers and Requests

        Comment

        • groupewibi
          Junior Member
          • May 2014
          • 7

          #5
          I have place a phpinfo there.

          Comment

          • tarasm
            Super Moderator
            • Mar 2014
            • 573

            #6
            I have checked EspoCRM on CGI/FastCGI server. It works fine for me.
            It looks like there is some server configuration issue. Could you check if these file exist:
            /api/v1/.htaccess
            /api/v1/index.php
            Job Offers and Requests

            Comment

            • groupewibi
              Junior Member
              • May 2014
              • 7

              #7
              Thank u for your respond.
              Yup, both file are there and existing. I put all files as it is in the latest package of ESPO CRM.
              Is there is a way to remove the control of mod_rewrite ? If the mod_rewrite is activated, it's just might be an error of control.

              Comment

              • tarasm
                Super Moderator
                • Mar 2014
                • 573

                #8
                It's not a problem with the control of md_rewrite. You have the problem with routing API of EspoCRM. In your case that's not working. For example, when open the page /api/v1/Metadata, it should redirect to /api/v1/index.php/Metadata.
                Actually it's very interesting...)
                Is it the correct path of "api/v1/index.php" /home/users5/g/groupewibi/www/production/biorecords/api/v1/index.php?
                Job Offers and Requests

                Comment

                • groupewibi
                  Junior Member
                  • May 2014
                  • 7

                  #9
                  YEs it is.

                  Comment

                  • tarasm
                    Super Moderator
                    • Mar 2014
                    • 573

                    #10
                    It's a very strange, because it routes to this file, but returns 404 error (you see that when open the http://<espo-url>/api/v1/Metadata).
                    It looks like you have one more routing or some configuration issue.
                    If you want I can try to fix it, but I need a file access to espocrm directory (FTP will be enough). If you ready to grant access, please send by private message.
                    Job Offers and Requests

                    Comment

                    • jimjones
                      Junior Member
                      • May 2014
                      • 18

                      #11
                      Hi Tarsam, I am in need of same solution - can I pm ftp stuff tx

                      Comment

                      • groupewibi
                        Junior Member
                        • May 2014
                        • 7

                        #12
                        Ok. Pm Sent.

                        Comment

                        • tarasm
                          Super Moderator
                          • Mar 2014
                          • 573

                          #13
                          Solved. It was some not standard server configuration for URL rewriting.

                          Here is the solution:
                          Open the file "api/v1/.htaccess" and replace this line:
                          Code:
                          RewriteRule ^ index.php [QSA,L]
                          to
                          Code:
                          RewriteRule ^ /api/v1/index.php [QSA,L]
                          Groupewibi, in your case, you have to change the following options in php.ini:
                          Code:
                          max_execution_time=300
                          max_input_time=300
                          
                          opcache.validate_timestamps=1
                          opcache.revalidate_freq=0
                          ​Cheers
                          Last edited by tarasm; 05-22-2014, 03:03 PM.
                          Job Offers and Requests

                          Comment

                          • groupewibi
                            Junior Member
                            • May 2014
                            • 7

                            #14
                            Thank u so much. Im changing that Asap.

                            Comment

                            • jimjones
                              Junior Member
                              • May 2014
                              • 18

                              #15
                              Tarasm - I do not have a .htaccess in that folder (from rc4). Can you post the full contents of this file, please

                              Comment

                              Working...