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
  • Brite
  • 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 - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. Config Apache with domain and subdomain

Config Apache with domain and subdomain

Scheduled Pinned Locked Moved LAMP
4 Posts 2 Posters 1.5k Views 2 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.
  • matix131997M Offline
    matix131997M Offline
    matix131997
    wrote on last edited by
    #1

    Hello, now I have a strange problem and I need a solution from you! I have tried before according to the Apache documentation to execute but it did not work.

    I have a non-standard application in which I want to run soon and I will have it configured like this:

    • "website.com" - is the domain where the application will be enabled and running from the CDN.
    • Create an "alias" under the subdomain that is "update.website.com" without the CDN and with Cloudron authentication.
      I will need this for the purpose of updating the app to bypass conflicts during updates and a decent backup.

    Why this? I have the application in the "public" folder, and the maintenance and update message page in the "html" folder.

    Then using Apache config, I change the location of the application from the main domain to the sub-domain "update", and on the main domain the update message. In this way, I can safely make a copy and update the application well without losing the CDN configuration.

    1 Reply Last reply
    1
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      What is the question 🙂 ?

      matix131997M 1 Reply Last reply
      1
      • girishG girish

        What is the question 🙂 ?

        matix131997M Offline
        matix131997M Offline
        matix131997
        wrote on last edited by
        #3

        @girish My bad, I didn't write the question.

        How to set in app.conf file to handle subdomain to another folder. To have 2 domains hooked up in one LAMP. The main one for the application and a subdomain for updates.

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          Just creating multiple VirtualHost should work. Something like below works for me.

          ServerName %{HTTP_HOST}
          
          <VirtualHost *:80>
              ServerName main.smartserver.io
          
              DocumentRoot /app/data/public/main
          
              LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
              CustomLog "|/bin/cat" proxy
              ErrorLog "|/bin/cat"
          
              <Directory /app/data/public/main>
                  Options +FollowSymLinks
                  AllowOverride All
                  Require all granted
              </Directory>
          
              # Do not remove this include. It's required for your app to see the Real IP
              Include "/app/code/apache/rpaf.conf"
          
          </VirtualHost>
          
          <VirtualHost *:80>
              ServerName update.smartserver.io
          
              DocumentRoot /app/data/public/update
          
              LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
              CustomLog "|/bin/cat" proxy
              ErrorLog "|/bin/cat"
          
              <Directory /app/data/public/update>
                  Options +FollowSymLinks
                  AllowOverride All
                  Require all granted
              </Directory>
          
              # Do not remove this include. It's required for your app to see the Real IP
              Include "/app/code/apache/rpaf.conf"
          
          </VirtualHost>
          
          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          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