Announcement

Collapse
No announcement yet.

Docker configuration

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

    Docker configuration

    I am trying to get Miva Empresa working via a Docker image and think I'm pretty close. But still when I try to open a .mvc file, it just downloads it instead of displaying the html.

    I followed the doc as seemed reasonable:

    * mivavm and env.so (renamed appropriately) moved to `/usr/local/apache2/cgi-bin/`
    * chmod and chown both
    * created a `/usr/local/apache2/mivadata` folder and chmod/chown it
    * added to the httpd.conf
    * restarted apache

    Here is the new lines from httpd.conf

    Code:
    SetEnv HTTP_MvCONFIG_DIR_MIVA /usr/local/apache2/htdocs
    SetEnv HTTP_MvCONFIG_DIR_DATA /usr/local/apache2/mivadata
    SetEnv HTTP_MvCONFIG_DIR_BUILTIN /usr/local/sbin/mivavm-v5.35/lib/builtins
    SetEnv HTTP_MvCONFIG_DIR_CA /etc/ssl/certs
    SetEnv HTTP_MvCONFIG_FILE_CA /etc/ssl/certs/ca-certificates.crt
    SetEnv HTTP_MvCONFIG_DATABASE_MIVASQL /usr/local/sbin/mivavm-v5.35/lib/databases/mivasql.so
    SetEnv HTTP_MvCONFIG_DATABASE_MYSQL /usr/local/sbin/mivavm-v5.35/lib/databases/mysql.so
    SetEnv HTTP_MvCONFIG_SYSTEMLIB_GD /usr/local/sbin/mivavm-v5.35/lib/builtins/mvlibgd.so
    SetEnv HTTP_MvCONFIG_SSL_OPENSSL /lib/libssl.so.6
    SetEnv HTTP_MvCONFIG_SSL_CRYPTO /lib/libcrypto.so.6
    SetEnv HTTP_MvCONFIG_COOKIES 1
    AddType application/x-miva-compiled .mvc
    Action application/x-miva-compiled /cgi-bin/mivavm
    I'm not seeing any errors, html pages display as they should, but .mvc just download.

    If it matters, I'm running on a Macbook Pro, M1 chip, and using the Macos_x64 mivavm binary. I'm also using the https://hub.docker.com/_/httpd image
    Last edited by Scott McCollough; 12-23-21, 03:24 PM. Reason: formatting fix

    #2
    If the file is being served, that would indicate the mime type mapping to Empresa is not working. Perhaps the addtype/action directives aren't applicable where they're being set?
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      I've gotten closer...

      Code:
      LoadModule cgi_module modules/mod_cgi.so
      was commented out, so I uncommented that

      NOW, I'm getting a 500 error when trying to access a .mvc file; .html files are still fine.
      Last edited by Scott McCollough; 12-23-21, 05:06 PM.

      Comment


        #4
        Put these in an .htaccess file, or in your httpd.con

        AddType application/x-miva-compiled .mvc
        Action application/x-miva-compiled /cgi-bin/mivavm
        William Gilligan - Orange Marmalade, Inc.
        www.OrangeMarmaladeinc.com

        Comment


          #5
          Here is the error log from apache:
          Code:
          [Mon Dec 27 05:50:52.189357 2021] [mpm_event:notice] [pid 1:tid 281473509568528] AH00489: Apache/2.4.52 (Unix) configured -- resuming normal operations
          [Mon Dec 27 05:50:52.189456 2021] [mpm_event:info] [pid 1:tid 281473509568528] AH00490: Server built: Dec 21 2021 01:56:22
          [Mon Dec 27 05:50:52.189461 2021] [core:notice] [pid 1:tid 281473509568528] AH00094: Command line: 'httpd -D FOREGROUND'
          [Mon Dec 27 05:50:52.189569 2021] [core:debug] [pid 1:tid 281473509568528] log.c(1570): AH02639: Using SO_REUSEPORT: yes (1)
          [Mon Dec 27 05:50:52.189628 2021] [mpm_event:debug] [pid 10:tid 281473502781840] event.c(2364): AH02471: start_threads: Using epoll (wakeable)
          [Mon Dec 27 05:50:52.189722 2021] [mpm_event:debug] [pid 12:tid 281473502781840] event.c(2364): AH02471: start_threads: Using epoll (wakeable)
          [Mon Dec 27 05:50:52.190442 2021] [mpm_event:debug] [pid 11:tid 281473502781840] event.c(2364): AH02471: start_threads: Using epoll (wakeable)
          [Mon Dec 27 05:50:59.499785 2021] [authz_core:debug] [pid 10:tid 281473485980048] mod_authz_core.c(815): [client 172.17.0.1:64052] AH01626: authorization result of Require all granted: granted, referer: http://localhost/index2.html
          [Mon Dec 27 05:50:59.500102 2021] [authz_core:debug] [pid 10:tid 281473485980048] mod_authz_core.c(815): [client 172.17.0.1:64052] AH01626: authorization result of <RequireAny>: granted, referer: http://localhost/index2.html
          [Mon Dec 27 05:50:59.500488 2021] [authz_core:debug] [pid 10:tid 281473485980048] mod_authz_core.c(815): [client 172.17.0.1:64052] AH01626: authorization result of Require all granted: granted, referer: http://localhost/index2.html
          [Mon Dec 27 05:50:59.500498 2021] [authz_core:debug] [pid 10:tid 281473485980048] mod_authz_core.c(815): [client 172.17.0.1:64052] AH01626: authorization result of <RequireAny>: granted, referer: http://localhost/index2.html
          [Mon Dec 27 05:50:59.500555 2021] [authz_core:debug] [pid 10:tid 281473485980048] mod_authz_core.c(815): [client 172.17.0.1:64052] AH01626: authorization result of Require all granted: granted, referer: http://localhost/index2.html
          [Mon Dec 27 05:50:59.500560 2021] [authz_core:debug] [pid 10:tid 281473485980048] mod_authz_core.c(815): [client 172.17.0.1:64052] AH01626: authorization result of <RequireAny>: granted, referer: http://localhost/index2.html
          qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
          [Mon Dec 27 05:50:59.505509 2021] [cgid:error] [pid 10:tid 281473485980048] [client 172.17.0.1:64052] End of script output before headers: mivavm, referer: http://localhost/index2.html

          Comment


            #6
            "End of script output before headers" screams permission issues in every language we work with in Apache servers. I'm sure it's a Captain Obvious thing, but I'd look at all that again.

            Comment


              #7
              Actually, I found my answer from the " Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory" error.

              In StackOverflow, I found https://stackoverflow.com/questions/...irectory-error which points out that since I'm running an M1 Mac, it's downloading an ARM image of `httpd`. But none of the mivavm tar.gz files are compiled to work on ARM architecture (maybe something for Miva to consider?).

              Which means, I need to go back further and start with a centos8 image, install and configure apache, then install the centos8 version of Empresa.

              Back to the drawing board

              Comment


                #8
                GAK a MAC !!!!! Have a great New Years

                Comment

                Working...
                X