Results 1 to 9 of 9

Thread: How to set DocumentRoot on shared server and is https:// needed for Contao 4.x

  1. #1
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default How to set DocumentRoot on shared server and is https:// needed for Contao 4.x

    This is probably an elementary question. I have a working installation Contao3.5 on a shared server. Want to upgrade to 4.X. I have created the public_html/contao/web folder and uploaded the contao-manager.phar file and renamed to contao-manager.phar.php

    When I try to run https://mydomain.se/contao/web/contao-manager.phar.php from the browser I get ERR_SSL_VERSION_OR_CIPHER_MISMATCH
    if I run http://mydomain.se/contao/web/contao-manager.phar.php I get 404 error.

    Maybe this is because I have not set the DocumentRoot? I have understood it should be set to public_html/contao/web/. But how to do that? The only instruction in the manual is to use the panel for this, but I cannot do that from my panel which has limited function. I have ssh access but am not sure if I can run any commands from that.

    This is a test-site so I do not want to set the DocumentRoot for all my sites. Is that possible?

    I have now tried to instll using composer. The instruction in the manual is very bad. It took me a while to understand that the command should be

    php composer.phar create-project contao/managed-edition public_html/contao/web/ 4.8

    Composer protests that I have only PHP 5.6.33 although the panel sais 7.1. And the check sais 7.1. Maybe my SSH is via the main site which is 5.6?

    But my first question remains about the DocumentRoot.
    Last edited by rollanders; 12/18/2019 at 21:03.

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Ask your provider how to set the DocumentRoot properly.
    Contao Community Moderator
    → Support options

  3. #3
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default

    Quote Originally Posted by xchs View Post
    Ask your provider how to set the DocumentRoot properly.
    They told me that the DocumentRoot is set to public_html and cant be changed. Does this means I cannot use Contao 4?

  4. #4
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Do you have shell access? If you could create a symlink to the web/ folder then it might work.
    Contao Community Moderator
    → Support options

  5. #5
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default

    I have SSH access but not sure about permissions. How should the symlink be done? what direction? Can you give me the command. The OS i Linux but I dont know what variant.

  6. #6
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    • Rename your existing public_html/ folder to e.g. public_html_bak/
    • Create the folder structure for your Contao installation (e.g. contao/web/)
    • Create the symlink
      Code:
      ln -s contao/web/ public_html
    • Transfer the contao-manager.phar to the contao/web/ folder and rename it to contao-manager.phar.php
    • Run the Contao Manager (https://example.com/contao-manager.phar.php)
    Contao Community Moderator
    → Support options

  7. #7
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default

    I renamed the /mydomain/public_html to mydomain/public_html_bak. When placed in mydomain/ i created the symlink, ie the symlink public_html and the original folder public_html_bak are in the same folder. Or should I create the symlink in the public_html_bak/contao/web/ folder?

    From the browser I call the http://mydomain/contao-manager.phar.php and get error that I do not have permission. I check the permissions and it is 770. Anything else I can do?

    I installed by using the composer instead php composer.phar create-project contao/managed-edition public_html_bak/contao/web/ 4.4
    Had to use 4.4 as the ssh had not access to PhP-7.1 (I may redo it).

    I now got Out of memory error. Am not sure if I can fix that with only ssh access on this shared server.
    Last edited by rollanders; 12/20/2019 at 23:24.

  8. #8
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    And in which directory is your Contao installation located?
    Contao Community Moderator
    → Support options

  9. #9
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    I would do it like that:

    • Rename the /mydomain/public_html to /mydomain/public_html_bak
    • Create the folder(s) /mydomain/contao/web/
    • Create a symlink in /mydomain/:
      Code:
      ln -s contao/web/ public_html
    • Transfer the contao-manager.phar to the /mydomain/contao/web/ folder and rename it to contao-manager.phar.php
    • Run the Contao Manager (https://example.com/contao-manager.phar.php)
    Contao Community Moderator
    → Support options

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •