Ubuntu 14.04 - Maintaining old file paths after moving document root?WWW sub-folder not executing?phpinfo();...

Advice for a new journal editor

Does SQL Server 2017, including older versions, support 8k disk sector sizes?

Why has the mole been redefined for 2019?

Avoiding morning and evening handshakes

Why do stocks necessarily drop during a recession?

How to solve a large system of linear algebra?

If I delete my router's history can my ISP still provide it to my parents?

Can making a creature unable to attack after it has been assigned as an attacker remove it from combat?

Why zero tolerance on nudity in space?

In Linux what happens if 1000 files in a directory are moved to another location while another 300 files were added to the source directory?

Can I become debt free or should I file bankruptcy ? How to manage my debt and finances?

How to count the characters of jar files by wc

What's a good word to describe a public place that looks like it wouldn't be rough?

Strange Sign on Lab Door

Blindfold battle as a gladiatorial spectacle - what are the tactics and communication methods?

Who is this Ant Woman character in this image alongside the Wasp?

How should I handle players who ignore the session zero agreement?

What is the purpose of easy combat scenarios that don't need resource expenditure?

What is 6÷2×(1+2) =?

How can I get my players to come to the game session after agreeing to a date?

Why do neural networks need so many training examples to perform?

How long is the D&D Starter Set campaign?

Why avoid shared user accounts?

Word or phrase for showing great skill at something WITHOUT formal training in it



Ubuntu 14.04 - Maintaining old file paths after moving document root?


WWW sub-folder not executing?phpinfo(); in /var/www/html not workingPHP file doens't reloadWhere do I put backend PHP files on Apache?How to display the content of my included PHP file on my included HTML file (Ubuntu Server 14.04)?ubuntu apache2 /var/www/html files permissions inconsistency for www-dataApache2 and php bizare 403 error (Forbidden)Issue changing Document Root in Ubuntu 16.04vsftpd folder file permission in ubuntuHow to permit routes declarations to load views in separate file in Apache2?













0















I have a server running Ubuntu 14.04 and a LAMP Stack. It's working, I am able to upload my javascript and php script to the html folder and I'm able to see my web site if I go to www.MySiteHere.com and the various folders under it.



I've recently made a new site using Grav. I have installed Grav in my server, and I've uploaded our new site. I want the new site to load automatically once our site is visited, and the way I did this was to change the document root to:



/var/www/html/GravFolder/


In this way, whenever I loaded www.MySiteHere.com, the new Grav site loads. This solution works.



However, the problem now is this: Since I moved the document root to the Grav Folder, I am now unable to access the other folders in the html folder, some of which contain php code that are important to our operations.



Let me illustrate the folder structure:



/var/root/html
|--> index.html <-- old index file
|--> GravFolder
|--> index.php <-- new index file
|--> folder_with_php_code
|--> fileUpload.php <-- impt php file


If the Document Root points to just the /html folder, I have no problems with the fileUpload.php file. I can go to www.MySiteHere/folder_with_php_code/fileUpload.php and I'll see my php upload page. But the Grav page would be accessible through www.MySiteHere.com/GravFolder, instead of www.MySiteHere.com



But since I want the new Grav site to be my new index, I point the Document Root to /html/GravFolder. This makes www.MySiteHere.com load the Grav Site I made, but in turn, when I try to go to www.MySiteHere/folder_with_php_code/fileUpload.php, it gives me a 404, because the server interprets the url as:



www.MySiteHere/GravFolder/folder_with_php_code/fileUpload.php



since the GravFolder is the document root. Now that's just the wrong path, hence, the 404.



Now, I could just add my folder_with_php_code under the GravFolder, but Grav doesn't allow php code to run within itself due to security reasons. And I don't have the time to try and go through hoops and loops just to make it work.



What I've tried is to make the html/index.html file redirect to the html/GravFolder/index.php, so that when visitors go to www.MySiteHere.com, it goes to the www.MySiteHere.com/GravFolder and loads the new site.



The file upload takes precedence over everything, and as much as possible, I want to keep the file upload url as www.MySiteHere.com/GravFolder/folder_with_php_code/fileUpload.php. But at the same time, I want www.MySiteHere.com to point to the GravFolder.



Is there any way that I can achieve what I want?



Any lead would be appreciated.










share|improve this question



























    0















    I have a server running Ubuntu 14.04 and a LAMP Stack. It's working, I am able to upload my javascript and php script to the html folder and I'm able to see my web site if I go to www.MySiteHere.com and the various folders under it.



    I've recently made a new site using Grav. I have installed Grav in my server, and I've uploaded our new site. I want the new site to load automatically once our site is visited, and the way I did this was to change the document root to:



    /var/www/html/GravFolder/


    In this way, whenever I loaded www.MySiteHere.com, the new Grav site loads. This solution works.



    However, the problem now is this: Since I moved the document root to the Grav Folder, I am now unable to access the other folders in the html folder, some of which contain php code that are important to our operations.



    Let me illustrate the folder structure:



    /var/root/html
    |--> index.html <-- old index file
    |--> GravFolder
    |--> index.php <-- new index file
    |--> folder_with_php_code
    |--> fileUpload.php <-- impt php file


    If the Document Root points to just the /html folder, I have no problems with the fileUpload.php file. I can go to www.MySiteHere/folder_with_php_code/fileUpload.php and I'll see my php upload page. But the Grav page would be accessible through www.MySiteHere.com/GravFolder, instead of www.MySiteHere.com



    But since I want the new Grav site to be my new index, I point the Document Root to /html/GravFolder. This makes www.MySiteHere.com load the Grav Site I made, but in turn, when I try to go to www.MySiteHere/folder_with_php_code/fileUpload.php, it gives me a 404, because the server interprets the url as:



    www.MySiteHere/GravFolder/folder_with_php_code/fileUpload.php



    since the GravFolder is the document root. Now that's just the wrong path, hence, the 404.



    Now, I could just add my folder_with_php_code under the GravFolder, but Grav doesn't allow php code to run within itself due to security reasons. And I don't have the time to try and go through hoops and loops just to make it work.



    What I've tried is to make the html/index.html file redirect to the html/GravFolder/index.php, so that when visitors go to www.MySiteHere.com, it goes to the www.MySiteHere.com/GravFolder and loads the new site.



    The file upload takes precedence over everything, and as much as possible, I want to keep the file upload url as www.MySiteHere.com/GravFolder/folder_with_php_code/fileUpload.php. But at the same time, I want www.MySiteHere.com to point to the GravFolder.



    Is there any way that I can achieve what I want?



    Any lead would be appreciated.










    share|improve this question

























      0












      0








      0








      I have a server running Ubuntu 14.04 and a LAMP Stack. It's working, I am able to upload my javascript and php script to the html folder and I'm able to see my web site if I go to www.MySiteHere.com and the various folders under it.



      I've recently made a new site using Grav. I have installed Grav in my server, and I've uploaded our new site. I want the new site to load automatically once our site is visited, and the way I did this was to change the document root to:



      /var/www/html/GravFolder/


      In this way, whenever I loaded www.MySiteHere.com, the new Grav site loads. This solution works.



      However, the problem now is this: Since I moved the document root to the Grav Folder, I am now unable to access the other folders in the html folder, some of which contain php code that are important to our operations.



      Let me illustrate the folder structure:



      /var/root/html
      |--> index.html <-- old index file
      |--> GravFolder
      |--> index.php <-- new index file
      |--> folder_with_php_code
      |--> fileUpload.php <-- impt php file


      If the Document Root points to just the /html folder, I have no problems with the fileUpload.php file. I can go to www.MySiteHere/folder_with_php_code/fileUpload.php and I'll see my php upload page. But the Grav page would be accessible through www.MySiteHere.com/GravFolder, instead of www.MySiteHere.com



      But since I want the new Grav site to be my new index, I point the Document Root to /html/GravFolder. This makes www.MySiteHere.com load the Grav Site I made, but in turn, when I try to go to www.MySiteHere/folder_with_php_code/fileUpload.php, it gives me a 404, because the server interprets the url as:



      www.MySiteHere/GravFolder/folder_with_php_code/fileUpload.php



      since the GravFolder is the document root. Now that's just the wrong path, hence, the 404.



      Now, I could just add my folder_with_php_code under the GravFolder, but Grav doesn't allow php code to run within itself due to security reasons. And I don't have the time to try and go through hoops and loops just to make it work.



      What I've tried is to make the html/index.html file redirect to the html/GravFolder/index.php, so that when visitors go to www.MySiteHere.com, it goes to the www.MySiteHere.com/GravFolder and loads the new site.



      The file upload takes precedence over everything, and as much as possible, I want to keep the file upload url as www.MySiteHere.com/GravFolder/folder_with_php_code/fileUpload.php. But at the same time, I want www.MySiteHere.com to point to the GravFolder.



      Is there any way that I can achieve what I want?



      Any lead would be appreciated.










      share|improve this question














      I have a server running Ubuntu 14.04 and a LAMP Stack. It's working, I am able to upload my javascript and php script to the html folder and I'm able to see my web site if I go to www.MySiteHere.com and the various folders under it.



      I've recently made a new site using Grav. I have installed Grav in my server, and I've uploaded our new site. I want the new site to load automatically once our site is visited, and the way I did this was to change the document root to:



      /var/www/html/GravFolder/


      In this way, whenever I loaded www.MySiteHere.com, the new Grav site loads. This solution works.



      However, the problem now is this: Since I moved the document root to the Grav Folder, I am now unable to access the other folders in the html folder, some of which contain php code that are important to our operations.



      Let me illustrate the folder structure:



      /var/root/html
      |--> index.html <-- old index file
      |--> GravFolder
      |--> index.php <-- new index file
      |--> folder_with_php_code
      |--> fileUpload.php <-- impt php file


      If the Document Root points to just the /html folder, I have no problems with the fileUpload.php file. I can go to www.MySiteHere/folder_with_php_code/fileUpload.php and I'll see my php upload page. But the Grav page would be accessible through www.MySiteHere.com/GravFolder, instead of www.MySiteHere.com



      But since I want the new Grav site to be my new index, I point the Document Root to /html/GravFolder. This makes www.MySiteHere.com load the Grav Site I made, but in turn, when I try to go to www.MySiteHere/folder_with_php_code/fileUpload.php, it gives me a 404, because the server interprets the url as:



      www.MySiteHere/GravFolder/folder_with_php_code/fileUpload.php



      since the GravFolder is the document root. Now that's just the wrong path, hence, the 404.



      Now, I could just add my folder_with_php_code under the GravFolder, but Grav doesn't allow php code to run within itself due to security reasons. And I don't have the time to try and go through hoops and loops just to make it work.



      What I've tried is to make the html/index.html file redirect to the html/GravFolder/index.php, so that when visitors go to www.MySiteHere.com, it goes to the www.MySiteHere.com/GravFolder and loads the new site.



      The file upload takes precedence over everything, and as much as possible, I want to keep the file upload url as www.MySiteHere.com/GravFolder/folder_with_php_code/fileUpload.php. But at the same time, I want www.MySiteHere.com to point to the GravFolder.



      Is there any way that I can achieve what I want?



      Any lead would be appreciated.







      14.04 server apache2 php lamp






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 mins ago









      RazgrizRazgriz

      1034




      1034






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1122127%2fubuntu-14-04-maintaining-old-file-paths-after-moving-document-root%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1122127%2fubuntu-14-04-maintaining-old-file-paths-after-moving-document-root%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

          Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

          Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...