Results 1 to 17 of 17

Thread: Plesk, Contao, Subdomain

  1. #1
    User
    Join Date
    05-12-14.
    Posts
    72

    Default Plesk, Contao, Subdomain

    Tried this without success, anyone any ideas would be very much appreciated:

    Created new subdomain and set root folder as httpdocs/subdomain.com/contao3/contao, uploaded folder named 'contao3' that contains all files from working localhost into the subdomain.

    Made the default index file to be index.php (also tried install.php because as far as i am aware Plesk will look for index.html by default bringing up the default Parallels panel page)

    now, how do i install contao. I tried calling the subdomain on its own, with the folder names contao3, then additionally with contao, hoping that i will land on the install tool, but as of yet, no joy.

    So does anybody have any idea what the problem may be?

    Many thanks+

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

    Beitrag

    Try to set the DocumentRoot for the subdomain to httpdocs/subdomain.com/contao3/ (i.e. the Contao main directory).

    Then, run the Contao install tool: http://sub.example.com/contao/install.php
    Contao Community Moderator
    → Support options

  3. #3
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    Quote Originally Posted by xchs View Post
    Try to set the DocumentRoot for the subdomain to httpdocs/subdomain.com/contao3/ (i.e. the Contao main directory).

    Then, run the Contao install tool: http://sub.example.com/contao/install.php

    I tried this, but now i get 'Failed to open page', so its still not finding the install.php for some reason.


    When i try to call a preview from within the Plesk control panel i get 'Error occurred'.

    When i placed an 'index.html' file only in the subdomain yesterday (removing the contao folder), the preview showed the correct page.

    So i have contacted the host to see if they know what the problem is, and i also checked all the settings for the subdomain against the settings of the current pages that are also built with Contao, and i see no difference.

    One thought was that i may need to wait for the DNS to resolve, but surely with a subdomain that is irrelevant.



    So my current situation is, i deleted the subdomain and created a new one. Made the root folder to be httpdocs/contao3.subdomain.com/contao3.
    Left the Apache settings at as default.

    Browsed to http://contao3.subdomain.com/contao/install.php, but im still getting a 'Failed to open page' message.

  4. #4
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    My host said

    first and only fail is to use
    http://contao3.subdomain.com, because this domain is not
    routed to the right server.
    Use your own domain (e.g. contao3.mydomain.com) instead and take care
    for a correct DNS routing.
    All other things that you tried has no effect.

    Solution should be to use your own domain and place a correct DNS record
    for your domain. Also use this domain in Plesk settings, just add a
    Alias to the current http://contao3.mydomain.com

  5. #5
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    So i have created a subdomain.
    I then have to add an alias.
    Meaning i have:
    contao3.subdomain.com as the subdomain
    contao3.mydomain.com as the alias.

    Now, i need to have the DNS record added to the my domain.com zone

    which means the CNAME is set to:
    contao3.mydomain => mydomain.com

    Then i can upload the my contao3 folder to the subdomain, install, test.

    Then, finally, from what i understand i then go to the original domain in Control panel and set the root directory to the root of the subdomain. At which point the 'staging site' will be available to users of the production site.

    I am hoping that this is all that needs to be done, but I am sure something else will come up that will cause me a problem.

    My main worry throughout all this is upsetting the current website resulting in downtime for the website.

    I want a seamless migration to the new Contao version.

    I did think about just uploading the new contao folder as a subfolder of the current live installation, and installing it there, then setting the root to the new installation and deleting the old website. But that sounded even more risky than creating a staging site.


    Id be interested to know if placing a new contao version as s subfolder of an old contao version on live would be possible, or would that be a bad idea???

    many thanks+

  6. #6
    User
    Join Date
    07-23-10.
    Posts
    86

    Default

    Generally you can set up as many Contao's on a server as you want. You just have to create subfolders and do the installation it this folder. Be aware, if you do so you need to have more then one Database to do the installation. For each Installation you need a won DB wich you have to create first inclusive a db user.

    Make it clean ans simple.

    If you have a website with the name example.com go to Plesk and click on the domain example.com. Now you can choose a new sub-domain and there you use the name dev.example.com (development) and but it in a sub-folder in httpdocs/myproject_new (as webroot). If you not want generate duplicated webcontent, just secure the sub-folder with a password as long as you develop. So google and other crawlers have no possibility to index the page.

    If the new website is up and running, remove the password, deactivate the Subdomain and set the domain-root of example.com to httpdocs/myproject_new.
    If you need further access to the old data just make a new subdomain named old.example.com and point to the old contao-root.
    Last edited by ciaobello; 07/17/2014 at 16:29.

  7. #7
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    Yea, i installed into a subfolder in the end.

    I am now able to access the install tool.

    However…….lol, in germany i have learnt there is always a however or a but……,

    after the Install tool password page i get the Safe Hack Mode…….grrrrrrrr.

    So, i tried modifying the localconfig.php file, adding the $GLOBALS['TL_CONFIG']['useFTP'] = true;

    login to install tool again…..errors, expections…..la la la

    So add the other $GLOBALS['TL_CONFIG']['ftphost'] = '****'; etc.

    log in again, get a blank page.

    OK, so…..ask the host to enable SUphp, hopefully that will avoid the Safe Hack Mode, if, that is, the host is willing to oblige.

    Waiting for an answer on that, see what gives.

  8. #8
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    Still waiting on my host to allow PHP permissions to create folders.
    This appears to be the problem with getting past the Safe Hack Mode.
    I also have Composer, and this is not compatible with Safe Hack Mode.

  9. #9
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    Ok so now my host has allowed me permissions to modify/change the php settings/type.

    BUT, i cannot run PHP as FASTCGI, only Apache module, or CGI Application.

    I have asked my host if its possible to run PHP as FASTCGI, but in the event that is not possible, from what i understand i can run PHP as CGI application.

    In this case, what else would i need to consider?

    I would imagine i have to possibly pay attention to the common PHP settings. But which ones?

    Whilst i have all these settings currently set to default:

    Common settings:

    safe_mode OFF


    safe_mode_include_dir


    safe_mode_exec_dir


    include_path


    session.save_path


    mail.force_extra_parameters


    register_globals


    open_basedir


    error_reporting


    display_errors


    log_errors


    allow_url_fopen


    file_uploads


    short_open_tag


    magic_quotes_gpc


    which of these should i be thinking of modifying???
    Or do i really need FASTCGI??

  10. #10
    User
    Join Date
    07-23-10.
    Posts
    86

    Default

    I think it is possible to run without fastcgi. You just have to take care that you do all the changes with scripts or the FTP User who has the adequate rights on the webserver. A Script like http://extplorer.sourceforge.net/ could help to solve problems when you have to create, move or delete data on the server.

    The Contao Check ist the right thing to see what functions in php have to be activated, specaly for the Composer.

    In the other hand, why the heck are you breaking your leg to us this Provider ... take one who makes your Contao live easier!

  11. #11
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    Hi ciaobella,

    I have from contao check:

    Safe Mode Hack

    php.ini settings

    The PHP safe_mode is not enabled.

    Creating a test folder

    The test folder could not be created.

    It seems that the PHP process does not have enough permissions to create folders on your server.

    Creating a test file

    The test file could not be created.

    It seems that the PHP process does not have enough permissions to create files on your server.





    So does that indicate a server side issue that i can fix, or is this just permissions on folders that i have to change?

    Can you expand on this?

    Yes, i know it would be easier to move to a server that supports Contao better, but as i have Contao 2.11.11 already running on this server, then i should think it possible to set up 3.2.

    One thing that did occur to me was that possibly an .htaccess in 2.11.11 is effecting the subfolder where i have 3.2??? Or is my thinking incorrect?

    If that might be the case, then the answer may be a simple one. Forgive me, my knowledge on how to resolve this is currently being stretched

  12. #12
    User
    Join Date
    07-23-10.
    Posts
    86

    Default

    So does that indicate a server side issue that i can fix, or is this just permissions on folders that i have to change?
    You can check this if you create 2 new folders. Once with the file manager from Plesk and the other time with a ftp program. If the permissions not are equal you need strictly use the option who works.

    Probably if you talk with the Provider, you should find this out too.

    I had a provider where i had to work strictly with this "extplorer" that i not allways had issues with Permission, Ownership Problem with the data.

    I dont know how good you now Linux. But most Providers use Linux based systems for Webhosting. If you not run php as fast-cgi, you have to create the folder Structure with a program who has same ownership as www-data or similar.

    With the safe-mode-hack you are giving Contao exact this rights to run it on the server with www-data ownership (Contao loggs in as a FTP User). But Save-Mode-Hack is old shool. By a provider who has his system up to date you don't need the save-mode-hack anymore. So this indicates, if your provider is not able to help, that you have to moove on.

  13. #13
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    Quote Originally Posted by ciaobello View Post
    You can check this if you create 2 new folders. Once with the file manager from Plesk and the other time with a ftp program. If the permissions not are equal you need strictly use the option who works.

    Probably if you talk with the Provider, you should find this out too.

    I had a provider where i had to work strictly with this "extplorer" that i not allways had issues with Permission, Ownership Problem with the data.

    I dont know how good you now Linux. But most Providers use Linux based systems for Webhosting. If you not run php as fast-cgi, you have to create the folder Structure with a program who has same ownership as www-data or similar.

    With the safe-mode-hack you are giving Contao exact this rights to run it on the server with www-data ownership (Contao loggs in as a FTP User). But Save-Mode-Hack is old shool. By a provider who has his system up to date you don't need the save-mode-hack anymore. So this indicates, if your provider is not able to help, that you have to moove on.

    Ill check it. Thanks.
    Provider never mentioned anything about doing it this way.
    provider will not offer FASTCGI for whatever reason.
    I can't even get in via the Safe Hack Mode........so not sure. I am going to recommend that we move to a new host i think, after I've taken a look at creating two files.

    EDIT: checked creating two files. Both have same permissions. That they are same owner and same group.

    BUT what i did notice was that the old installation of COntao (v2.11.11) has 777 permissions on all its folders!!!!!. Now i didn't do this or set this old installation up, and i would imagine this is why this version works, and 3.2 will not.
    Last edited by markclaus; 07/17/2014 at 18:14.

  14. #14
    User
    Join Date
    07-23-10.
    Posts
    86

    Default

    BUT what i did notice was that the old installation of COntao (v2.11.11) has 777 permissions on all its folders!!!!!
    I get chicken-skin when i read that Just move along. This kind of providers will disappear in the near future because of security issues.

  15. #15
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    Quote Originally Posted by ciaobello View Post
    I get chicken-skin when i read that Just move along. This kind of providers will disappear in the near future because of security issues.
    Actually, i think they are just not set up to host CMS systems. As my long time hosted in the UK said, they are either very secure and useless, or very useful but completely insecure

    So next question is, (i would recommend a my UK host, but i think we will be looking for a german one), is who is a good Contao hosted?

    Cheers

  16. #16
    User
    Join Date
    07-23-10.
    Posts
    86

    Default

    i would recommend a my UK host, but i think we will be looking for a german one
    If you understand German this would be a good idea I could propose my provider as he also uses Plesk (11,5). The Control panel is English but i don't think that FAQ and other help is in English too. At least i could nothing find.

    Inetrobots.de is the Contaos main developers Hosting. But as i know he not offers Hostings outside of the German speaking countries. The Page is just German too.

    If you give a bit more data for what you like to have, i can help to find one. Good Providers give a test account and are paying for Affiliates Programs, with no additional costs for you

    If you are seriously interested in help you can contact me over PM.

  17. #17
    User
    Join Date
    05-12-14.
    Posts
    72

    Default

    Well actually, now i have Contao installed (even though under 777 permissions), I am going to see if this was just required to install the system.
    I am actually going to change all permissions back to 755/644 and see if the system will still function…..or not.

    If i can do that, then i guess things are not so bad.

    ill update here once i find anything out, either way.


    I mean, further to this, as I have composer enabled in Contao, when i was trying to install i did get the message that Composer is not compatible with SMH, but nevertheless, it appears to be functioning ok.

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
  •