Announcement

Collapse
No announcement yet.

Help with empresa on Ubuntu setup.

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

    Help with empresa on Ubuntu setup.

    Hey guys i know this is something dumb, having issues seeing it. Empresa install on ubuntu 18.04
    Standard Apache2 , no Suexec just a testing environment.

    Vhost config file:
    <VirtualHost 127.0.0.1:80>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
    </Directory>

    <Directory /home/remindme/public_html>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
    </Directory>

    ServerName 127.0.0.1
    ServerAdmin [email protected]
    DocumentRoot /home/remindme/public_html
    DirectoryIndex index.mvc

    SetEnv MvCONFIG_DIR_MIVA /home/remindme/public_html
    SetEnv MvCONFIG_DIR_DATA /home/remindme/mivadata
    SetEnv MvCONFIG_DIR_BUILTIN /home/remindme/mivavm/lib/builtins
    SetEnv MvCONFIG_DIR_CA /etc/ssl/certs
    SetEnv MvCONFIG_SSL_OPENSSL /lib/libssl.so.6
    SetEnv MvCONFIG_SSL_CRYPTO /lib/libcrypto.so.6
    SetEnv MvCONFIG_DATABASE_MIVASQL /home/remindme/mivavm/lib/databases/mivasql.so
    SetEnv MvCONFIG_DATABASE_MYSQL /home/remindme/mivavm/lib/databases/mysql.so
    SetEnv MvCONFIG_COOKIES 0
    AddType application/x-miva-compiled .mvc
    Action application/x-miva-compiled /cgi-bin/mivavm

    LogLevel debug
    ErrorLog ${APACHE_LOG_DIR}/remind_error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    </VirtualHost>

    Apache2.conf is unaltered. mivavm-v5.33 binary is in place with correct perms, along with env.so renamed to libmivaconfig.so.
    Something is causing apache to look at the mivavm binary as a folder and not an executable. Here is the debug error i get.

    [Wed Jun 17 12:58:50.479965 2020] [core:info] [pid 14875:tid 140192241010432] [client 127.0.0.1:41064] AH00130: File does not exist: /usr/lib/cgi-bin/mivavm/diagtool.mvc, referer: http://127.0.0.1/

    Im sure it is something very dumb cause those are the only ones i do! Been looking at it for 2 hours and my eyes hurt. Hopefully one of you guys will see my mistake right away. Thanks.


    #2
    That syntax is normal for the apache error, which passes the request to the Action recipient (mivavm) relative to the document root. What do you get if you make a request for http://127.0.0.1/cgi-bin/mivavm ? Should give you something like "Configuration Error: Error loading configuration library: Miva is configured for redirected use only" if the cgi support is working, and if that occurs, then I'd think Empresa is not seeing its environment variables.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      This the error when i request http://127.0.0.1/cgi-bin/mivavm

      [Wed Jun 17 16:04:58.345081 2020] [authz_core:debug] [pid 1041:tid 139690388748032] mod_authz_core.c(809): [client 127.0.0.1:59590] AH01626: authorization result of Require all denied: denied
      [Wed Jun 17 16:04:58.345112 2020] [authz_core:debug] [pid 1041:tid 139690388748032] mod_authz_core.c(809): [client 127.0.0.1:59590] AH01626: authorization result of <RequireAny>: denied
      [Wed Jun 17 16:04:58.345117 2020] [authz_core:error] [pid 1041:tid 139690388748032] [client 127.0.0.1:59590] AH01630: client denied by server configuration: /usr/lib/cgi-bin/mivavm

      Comment


        #4
        Oh, your config may be denying all access via the "Require all denied" and no passing criteria overriding it.
        David Hubbard
        CIO
        Miva
        [email protected]
        http://www.miva.com

        Comment


          #5
          Ok. How should i fix that? The require all denied is in the directory container for root? When i commented that out it asked me to download the mivavm binary.
          When i requested the diagtool.mvc it gave me a file not found.

          [Wed Jun 17 16:15:23.962631 2020] [authz_core:debug] [pid 2595:tid 139625394124544] mod_authz_core.c(835): [client 127.0.0.1:59600] AH01628: authorization result: granted (no directives)
          [Wed Jun 17 16:15:23.962643 2020] [core:info] [pid 2595:tid 139625394124544] [client 127.0.0.1:59600] AH00130: File does not exist: /usr/lib/cgi-bin/mivavm/diagtool.mvc

          Comment


            #6
            I think you're missing an Options +ExecCGI to allow CGI execution in the ScriptAlias directory, unless that's elsewhere in the config.
            David Hubbard
            CIO
            Miva
            [email protected]
            http://www.miva.com

            Comment


              #7
              Nope, that is the whole file. Is /usr/lib/cgi-bin/ the default for apache? Should i need to use a ScriptAlias?
              If I do need the script alias and need to add the ExecCGI option would i have to create a directory container for that?
              Eg:
              <Directory /usr/lib/cgi-bin/>
              Options +ExecCGI
              </Directory>

              Comment


                #8
                I'm not familiar with Ubuntu, or if other modules / config in its default apache config files could impact this from working at the virtual host level. You should require both ExecCGI and ScriptAlias if there is not something otherwise unusual about this Apache setup. Having user content under /usr/lib/ seems odd but that could be an Ubuntu thing. Normally anything that would change and/or be associated with users would be under /var, sometimes /opt
                David Hubbard
                CIO
                Miva
                [email protected]
                http://www.miva.com

                Comment


                  #9
                  I know var/www/html is the apache default DocumentRoot with Ubuntu. Also the cgi-bin directory was in /usr/lib/ so I assumed it was the global directory.
                  So i threw in a directory container for /usr/lib/cgi-bin and gave it Options +ExecCGI,
                  now my error changed to my documentroot folder instead of Cgi-bin. I dont know what this means.


                  [Wed Jun 17 16:41:13.762324 2020] [authz_core:debug] [pid 3087:tid 140113677891328] mod_authz_core.c(809): [client 127.0.0.1:59666] AH01626: authorization result of <RequireAny>: granted
                  [Wed Jun 17 16:41:13.762358 2020] [actions:info] [pid 3087:tid 140113677891328] [client 127.0.0.1:59666] AH00652: File does not exist: /home/remindme/public_html/DIAGTOOL.MVC

                  Comment


                    #10
                    It is probably case sensitive; make sure it's diagtool.mvc unless you've renamed the file to all caps.
                    David Hubbard
                    CIO
                    Miva
                    [email protected]
                    http://www.miva.com

                    Comment


                      #11
                      Didnt realize i had Caps on. It is the same error lower case.

                      Comment


                        #12
                        I have this working great on our production server hosting 3 sites. I copied the exact syntax of the config from the server, for the parts i needed. This one is causing a headache. If there is nothing wrong with the configuration file, and permissions are all ok, what other software could i be missing that would keep this
                        from working?? Thank you for your help Hostasaurus. Im gonna go home for the night. Might look at it tomorrow.

                        Comment


                          #13
                          Do static files serve successfully from that public_html directory? If that works, I'd probably next move on to a "hello world" type cgi script, in perl or something similar that has an interpreter on your server; just easy text file with .cgi extension, executable, should spit out text when requested. If that works, move on to the script echo'ing all environment variables it sees to confirm the empresa variables are visible.
                          David Hubbard
                          CIO
                          Miva
                          [email protected]
                          http://www.miva.com

                          Comment


                            #14
                            OK so perl is not being executed either. I tried a simple script and its just outputting the text of the script to the screen like its a document.

                            Comment


                              #15
                              I'm afraid I'm out of ideas; sounds like CGI script processing is not occurring, but the ExecCGI should have made that work. We don't use or test on Ubuntu internally so I don't have a test system to investigate the setup on.
                              David Hubbard
                              CIO
                              Miva
                              [email protected]
                              http://www.miva.com

                              Comment

                              Working...
                              X