Coder Social home page Coder Social logo

Comments (4)

5050 avatar 5050 commented on May 31, 2024

I I tryed to edit your post to have correct code display unsuccessfully. I tryed ``` , [code], < addr >, < pre >, none seems to work! :-(

But it is ok below:

                if ( ctrl_options::GetSystemOption( 'use_openbase' ) == "true" || ctrl_options::GetSystemOption( 'use_suhosin' ) == "true") {
                $line .='<IfModule  mod_php5.c>'. fs_filehandler::NewLine();
                    if ( $rowvhost[ 'vh_obasedir_in' ] <> 0 ) {
                        $line .= 'php_admin_value open_basedir "' . ctrl_options::GetSystemOption( 'hosted_dir' ) . $vhostuser[ 'username' ] . "/public_html" . $rowvhost[ 'vh_directory_vc' ] . ctrl_options::GetSystemOption( 'openbase_seperator' ) . ctrl_options::GetSystemOption( 'openbase_temp' ) . '"'. fs_filehandler::NewLine();
                    }
                     if ( $rowvhost[ 'vh_suhosin_in' ] <> 0 ) {
                        $line .= ctrl_options::GetSystemOption( 'suhosin_value' ) . fs_filehandler::NewLine();
                    }
                $line .='</IfModule>'. fs_filehandler::NewLine();
                }

About vhost definition, I will read and try to understand where is the problem : we did not noticed here until now. Can you explain better what is the problem ?
-> you wrote Centora 7 : is it CentOs 7 ?
-> your fix may silently skip open_basedir and suhosin : with current configuration of zPanel/Sentora, they must not be disabled, except for very special case under master admin responsability : server not shared, software installed and users all trusted.

About static files, I did not though about them (they are historical), but I'm not sure why is may be better to make them really static without any php code.

I will get a look for error pages, but the predefined directory for these files is really _erropages with underscore prefix !

from sentora-core.

TGates71 avatar TGates71 commented on May 31, 2024

I prefer the 'static' pages to include php as they can be customized a lot better to match your hosting company and integrate with your site: http://www.mach-hosting.com/ -=- http://cp.mach-hosting.com/etc/static/errorpages/404.html and they work just fine for all hosted accounts. Not too mention the use of the 'Error Pages Editor' module I made so user's can customize them right inside the panel to match their site also.

from sentora-core.

Rakhmanov avatar Rakhmanov commented on May 31, 2024
  1. Reasoning behind this suggestion is that when installing php-fpm each php files location has to be declared to be properly redirected. So each folder for those "static files" needs to be written in vhost configs. PHP has adopted the fpm in the core and its clearly way
    better way to implement when structure allows. We can make those pages to be generated from database somehow. I need think more on possible solving.

Example:
For main sentora files
ProxyPassMatch ^/(..php(/.)?)$ fcgi://127.0.0.1:9000/etc/sentora/panel/$1

And for each vhost record of existing domain
ProxyPassMatch ^/(.*.php)$ fcgi://127.0.0.1:9000/var/sentora/hostdata/zadmin/public_html/fiatstyle_com/$1

  1. Yes its CentOS 7 x64 sorry for confusion.

I will write more, really glad to see such alive response! I will continue to thinking and make some solutions.

from sentora-core.

TGates71 avatar TGates71 commented on May 31, 2024

Ok, I think I see where you are going. Error pages do not fall under this since they get copied to the user's hosting space. The others, like bandwidth exceeded, over limit, etc are written into the vhost file when somebody's account is exceeded hence no more access to their site files. (I also have these customized like my error pages.) Redirected I think is where I am getting confused since the user's vhost(s) entries get changed to point to the static files if exceeded, etc. locking their site down. (so if somebody tries 'theirdomain.com/sitehere.php' it will throw a 404 rather than showing the file 'sitehere.php' if the user tries to bypass their restriction. There is no 'redirect' as their vhost now points to the proper 'locking' page/folder. So, in short, the user's site root entry in the vhost is re-written to point directly at the specific static page's folder. Or I just do not get what you are meaning LOL

from sentora-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.