Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. How to host a website on LAMP?

How to host a website on LAMP?

Scheduled Pinned Locked Moved Solved LAMP
14 Posts 4 Posters 2.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shrey
    wrote on last edited by
    #1

    Hi all.

    I realise this might be a very basic task for most.
    But, i'm having some trouble with deploying my website to Cloudron LAMP stack.

    Basically, once i deploy the files to the public folder, restart the app, i encounter the 500 Internal Sever Error.

    What's the cause of this error (in the context of Cloudron's LAMP app) and do i resolve it?

    Thanks,

    timconsidineT 1 Reply Last reply
    0
    • S shrey marked this topic as a question on
    • S Offline
      S Offline
      shrey
      wrote on last edited by
      #11

      Seem to have identified the issue.

      .htaccess / .htpasswd were the culprit here.

      In the .htaccess file, once i provided the full path to the .htpasswd file, the site works.

      AuthUserFile /app/data/public/.htpasswd
      
      timconsidineT 1 Reply Last reply
      1
      • A Offline
        A Offline
        akammeyer
        wrote on last edited by
        #2

        Can you look at the app’s logs and provide more information on the error?

        1 Reply Last reply
        1
        • S shrey

          Hi all.

          I realise this might be a very basic task for most.
          But, i'm having some trouble with deploying my website to Cloudron LAMP stack.

          Basically, once i deploy the files to the public folder, restart the app, i encounter the 500 Internal Sever Error.

          What's the cause of this error (in the context of Cloudron's LAMP app) and do i resolve it?

          Thanks,

          timconsidineT Offline
          timconsidineT Offline
          timconsidine
          App Dev
          wrote on last edited by
          #3

          @shrey “deploy website” means uploading static html, js, css ? Or it’s a PHP-based app ?

          S 1 Reply Last reply
          0
          • timconsidineT timconsidine

            @shrey “deploy website” means uploading static html, js, css ? Or it’s a PHP-based app ?

            S Offline
            S Offline
            shrey
            wrote on last edited by
            #4

            @timconsidine The former: uploading html, js and css files to the public folder.

            timconsidineT 1 Reply Last reply
            0
            • scookeS Offline
              scookeS Offline
              scooke
              wrote on last edited by
              #5

              I'm running a PHP app in the LAMP app right now. Anything that would run in a regular LAMP env will work. Most likely your permissions are incorrect, and/or you uploaded the root folder (with all that it contains) to Public, when it's everything IN your root folder that has to go in Public. Public is the root folder now.

              A life lived in fear is a life half-lived

              1 Reply Last reply
              0
              • S shrey

                @timconsidine The former: uploading html, js and css files to the public folder.

                timconsidineT Offline
                timconsidineT Offline
                timconsidine
                App Dev
                wrote on last edited by
                #6

                @shrey as you're uploading static files, you could also try deploying to the public folder of a Surfer app. Firstly it is just another option to serve up your website, but also it could be useful to know if the result is same or different.

                Using the LAMP app's File Manager, do you see if the files are owned by cloudron ?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  shrey
                  wrote on last edited by
                  #7

                  This is my unedited view of theRoot folder -->
                  image.png


                  And then the Public folder -->

                  image.png


                  This results in the app domain itself, hitting the 500 Internal Server Error.

                  1 Reply Last reply
                  0
                  • timconsidineT Offline
                    timconsidineT Offline
                    timconsidine
                    App Dev
                    wrote on last edited by timconsidine
                    #8

                    www-data is good for file permissions.
                    I notice it seems to be built with noodl
                    I don't know this (looks nice) but it seems it needs to call something, which is not returning anything, leading to the 500 error. Wild guess it is calling, or trying to call, a MongoDB db.

                    As a background it's good to know that a Noodl App consists of three parts:
                    The database All Noodl applications must be backed by a database, you can use either a MongoDB or Postgres compatible database. This is where users and other records are stored. Nodes like Query Records access the database via the backend web service.
                    The backend service This is the Noodl backend service that is provided via a Docker image and an instance can be started on most cloud providers. The Noodl backend is based on and compatable with the Parse Platform which is a great choice for a backend service. A solid open source project with an active foundation supporting many of the critical functions needed.
                    Static frontend hosting Noodl applications are SPAs (Single Page Applications) and need a place that serves the application frontend created when you deploy your application from Noodl.

                    https://noodlapp.github.io/noodl-docs/docs/guides/deploy/using-an-external-backend#the-different-parts-of-a-noodl-app

                    Did you set up this up ?
                    Just guessing for now, let us know any info about how you have handled this.

                    S 1 Reply Last reply
                    0
                    • timconsidineT timconsidine

                      www-data is good for file permissions.
                      I notice it seems to be built with noodl
                      I don't know this (looks nice) but it seems it needs to call something, which is not returning anything, leading to the 500 error. Wild guess it is calling, or trying to call, a MongoDB db.

                      As a background it's good to know that a Noodl App consists of three parts:
                      The database All Noodl applications must be backed by a database, you can use either a MongoDB or Postgres compatible database. This is where users and other records are stored. Nodes like Query Records access the database via the backend web service.
                      The backend service This is the Noodl backend service that is provided via a Docker image and an instance can be started on most cloud providers. The Noodl backend is based on and compatable with the Parse Platform which is a great choice for a backend service. A solid open source project with an active foundation supporting many of the critical functions needed.
                      Static frontend hosting Noodl applications are SPAs (Single Page Applications) and need a place that serves the application frontend created when you deploy your application from Noodl.

                      https://noodlapp.github.io/noodl-docs/docs/guides/deploy/using-an-external-backend#the-different-parts-of-a-noodl-app

                      Did you set up this up ?
                      Just guessing for now, let us know any info about how you have handled this.

                      S Offline
                      S Offline
                      shrey
                      wrote on last edited by
                      #9

                      @timconsidine said in How to host a website on LAMP?:

                      I don't know this (looks nice) but it seems it needs to call something, which is not returning anything, leading to the 500 error. Wild guess it is calling, or trying to call, a MongoDB db.

                      Yeah, not an issue in my case. Have successfully deployed a multitude of 'Noodl apps', in a similar way, just to other hosting services (including LAMP servers) until now.

                      Also, i did get the same set of files working fine (i think) in Surfer now.

                      But, would still like to know how to deploy sites/apps properly in the LAMP app in Cloudron.

                      timconsidineT 1 Reply Last reply
                      1
                      • A Offline
                        A Offline
                        akammeyer
                        wrote on last edited by akammeyer
                        #10

                        If you go into the Setting for the App on the Cloudron dashboard, you can get to the logs in from
                        image.png

                        From there you will probably get more info as to what is actually causing the 500 error.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          shrey
                          wrote on last edited by
                          #11

                          Seem to have identified the issue.

                          .htaccess / .htpasswd were the culprit here.

                          In the .htaccess file, once i provided the full path to the .htpasswd file, the site works.

                          AuthUserFile /app/data/public/.htpasswd
                          
                          timconsidineT 1 Reply Last reply
                          1
                          • S shrey has marked this topic as solved on
                          • S shrey

                            Seem to have identified the issue.

                            .htaccess / .htpasswd were the culprit here.

                            In the .htaccess file, once i provided the full path to the .htpasswd file, the site works.

                            AuthUserFile /app/data/public/.htpasswd
                            
                            timconsidineT Offline
                            timconsidineT Offline
                            timconsidine
                            App Dev
                            wrote on last edited by
                            #12

                            @shrey great news, well done
                            And great that it is a simple fix, even if not immediately obvious.

                            Seems to me that you do know how to deploy to LAMP properly. 👍

                            1 Reply Last reply
                            1
                            • S shrey

                              @timconsidine said in How to host a website on LAMP?:

                              I don't know this (looks nice) but it seems it needs to call something, which is not returning anything, leading to the 500 error. Wild guess it is calling, or trying to call, a MongoDB db.

                              Yeah, not an issue in my case. Have successfully deployed a multitude of 'Noodl apps', in a similar way, just to other hosting services (including LAMP servers) until now.

                              Also, i did get the same set of files working fine (i think) in Surfer now.

                              But, would still like to know how to deploy sites/apps properly in the LAMP app in Cloudron.

                              timconsidineT Offline
                              timconsidineT Offline
                              timconsidine
                              App Dev
                              wrote on last edited by
                              #13

                              @shrey said in How to host a website on LAMP?:

                              Yeah, not an issue in my case.

                              So Noodl does not require the MondoDB connection ?

                              No experience of Noodl, but looks interesting. WIll try to find time (ha ha ha) to play with it.

                              S 1 Reply Last reply
                              0
                              • timconsidineT timconsidine

                                @shrey said in How to host a website on LAMP?:

                                Yeah, not an issue in my case.

                                So Noodl does not require the MondoDB connection ?

                                No experience of Noodl, but looks interesting. WIll try to find time (ha ha ha) to play with it.

                                S Offline
                                S Offline
                                shrey
                                wrote on last edited by shrey
                                #14

                                @timconsidine said in How to host a website on LAMP?:

                                So Noodl does not require the MondoDB connection ?

                                Noodl is primarily a frontend builder.

                                It's just that it has first-class connectors for Parse (which is based on MongoDB), to add the data layer for your app.

                                Anyway, you can bring any data source (accessible via REST/GRAPHQL/Static) to your app in Noodl.

                                1 Reply Last reply
                                1
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search