Posts by Pupp3tm4st3r

    Hi there,


    on our development server we are using i-mscp 1.2.9 in combination with phpswitcher. (phpswitcher btw. works good)
    For one subdomain we "activated" php 5.6.8 (for a shopware installation), ioncube seems to be installed correct:



    Code
    1. PHP 5.6.8 (cli) (built: Aug 18 2015 10:19:20)
    2. Copyright (c) 1997-2015 The PHP Group
    3. Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    4. with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.14, Copyright (c) 2002-2015, by ionCube Ltd.
    5. with Xdebug v2.3.2, Copyright (c) 2002-2015, by Derick Rethans
    6. with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

    But shopware doesn´t recognize ioncube, it always says, that ioncube is not available :(


    Did I forget to install or configure something?


    Regards
    Simon

    With the help of Ninos I managed to get kind of what I wanted to :)


    By editing the file /etc/imscp/apache/parts/custom.conf.tpl


    Code: /etc/imscp/apache/parts/custom.conf.tpl
    1. # SECTION HTACCESS
    2. <Location />
    3. AuthType Basic
    4. AuthName "xxxx"
    5. AuthUserFile {HOME_DIR}/.htpasswd
    6. AuthGroupFile {HOME_DIR}/.htgroup
    7. require valid-user
    8. </Location>

    I achieved the following:



    When a new Domain/Subdomain is created, the htaccess information is automatically created and linked via vhost definition. i-mscp automatically creates a file <domainname>.conf under the directory /etc/apache2/imscp with the above content. So I am able to manage a domain and all of the subdomains via one htpasswd and htaccess file and I don´t have to do that manually. Good thing about that, even it may not be the best solution after all, the custom.conf.tpl won´t be touched ("Any changes made to this file will be preserved on update."). so I don´t have to change that all the time.


    I have to say, this is a solution specific for our development server, I would not recommend doing this on a production server!

    Hi Ninos,


    thanks once again. I´ve thought of another way now - I will alter the custom.conf.tpl that way, that the htaccess information will be directly written into the vhost configuration. Now theres one thing...


    AuthUserFile /var/www/virtual/{DOMAIN_NAME}/.htpasswd
    AuthGroupFile /var/www/virtual/{DOMAIN_NAME}/.htgroup


    fits perfectly for the main domain, but what about subdomains? Is there a variable for parent domain? I´m wondering because in the vhost configuration files under /etc/apache2/sites-available/<subdomain>.conf I can see that for <Location /stats>... the authuserfile and authgroupfile directives still point to the directory of the parent domain and not to the subdomain (which is right by design), but how did you achieve that?


    Thanks
    Simon

    Gotta have to ask again - so there is definitely NO WAY to secure the whole directory of the user/domain? It would be great, because one doesn´t have to set the htaccess for every subdomain (as they are not created in the /htdocs directory but in the root of the users www directory).


    Thanks in advance
    Simon

    Hi there,


    I´ve got some question concerning .htaccess over web admin panel.


    I´ve tested with two test domains.


    Domain A has several subdomains - one of the subdomains has an existing TYPO3 with its own .htaccess. When I want to secure the folder via web panel I can choose the folder, user etc. and click "protect it" - everything works find BUT where does imscp save the .htaccess file? As there already exists an htaccess file in the htdocs directory, and it is not overwritten, I don´t know where imscp saves the self created htacces? The database doesn´t show anything (table htaccess) except "status ok". (directory is /"subdomain"/htdocs)


    Domain B has some quite unusual behaviour? When adding a protected area I can choose everything and successfully create the protected area - but then for some directories the status is "unexpected error" - the affected directories are the parent directories for the subdomains - is this normal? (example: the subdomain is sub01 - it doesn´t create it for the directory sub01 but for sub01/htdocs).


    Last thing - it is not possible to create ONE .htaccess for the main domain and the subdomains, am I right?


    Thanks in advance
    Simon


    Funny thing:



    Code: /var/log/imscp/Htaccess_module_dvv:6.log
    1. [Fri Oct 9 13:58:28 2015] [debug] iMSCP::EventManager::register: Registering listener on the afterHttpdBuildConfFile event from Servers::httpd::apache_fcgid::_init
    2. [Fri Oct 9 13:58:28 2015] [debug] Modules::Abstract::_runAction: Calling action deleteHtaccess on Servers::httpd
    3. [Fri Oct 9 13:58:28 2015] [debug] iMSCP::Config::_init: Tying /etc/imscp/apache/apache.data
    4. [Fri Oct 9 13:58:28 2015] [debug] iMSCP::Config::_loadConfig: Loading /etc/imscp/apache/apache.data
    5. [Fri Oct 9 13:58:28 2015] [debug] iMSCP::Config::_parseConfig: Parsing /etc/imscp/apache/apache.data
    6. [Fri Oct 9 13:58:28 2015] [debug] iMSCP::File::save: Saving file /var/www/virtual/xxxxx.de/dvv/htdocs/.htaccess
    7. [Fri Oct 9 13:58:28 2015] [debug] iMSCP::File::mode: Changing mode for /var/www/virtual/xxxxx.de/dvv/htdocs/.htaccess to 640
    8. [Fri Oct 9 13:58:28 2015] [debug] iMSCP::File::owner: Changing owner and group for /var/www/virtual/xxxxx.de/dvv/htdocs/.htaccess to 1003:1003

    But the .htaccess is not changed, its still the symlink to the TYPO3 .htaccess file...



    AAAAH, i´ve seen it myself - imscp changes the TYPO3 .htaccess file - it just inserts its own settings - is this okay? Is this done via find and replace?

    Aaaah, I already saw that file, but I was confused by the name and didn´t want to destroy anything. Am I right, that every change on that file will be overwritten on the next update?


    And as there are 4 versions of it...which is the one I have to change?


    /etc/imscp/apache/working/00_nameserver.conf
    /etc/imscp/apache/00_nameserver.conf
    /etc/apache2/sites-enabled/00_nameserver.conf
    /etc/apache2/sites-available/00_nameserver.conf


    Thanks a lot!!


    Best regards
    Simon


    -push

    Its the way our developers go, they push their content in the htdocs directory and don´t want to check for the index.html everytime. Thats the only reason why. The manual work should be as low as possible. I´m the same opinion as you are, but they aren´t.