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. Changing DocumentRoot

Changing DocumentRoot

Scheduled Pinned Locked Moved Solved LAMP
apache
3 Posts 2 Posters 701 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.
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by girish
      #1

      A popular request with the LAMP is how to change the DocumentRoot.

      The latest package now has the apache configs under /app/data/apache. You can edit the files there and just restart the app.

      For example, to move the PHP directory to say /app/data/public/frontend, edit apache/app.conf like so:

      <VirtualHost *:80>
          DocumentRoot /app/data/public/frontend
      
          ErrorLog "|/bin/cat"
          CustomLog "|/bin/cat" combined
      
          <Directory /app/data/public/frontend>
              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"
          # This line can be commented out, if you do no require PHPMyAdmin Access
          Include "/app/code/apache/phpmyadmin.conf"
      
      </VirtualHost>
      
      1 Reply Last reply
      4
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        cc @andirahmat I recall giving you some complicated htaccess rules for this. It's simpler now.

        A 1 Reply Last reply
        1
        • girishG girish

          cc @andirahmat I recall giving you some complicated htaccess rules for this. It's simpler now.

          A Offline
          A Offline
          andirahmat
          wrote on last edited by
          #3

          @girish Thank you girish

          1 Reply Last reply
          0
          • steinhmorS steinhmor referenced this topic on
          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