Announcement

Collapse
No announcement yet.

How to run multiple sc website deployments together properly

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to run multiple sc website deployments together properly

    The problem:
    Suppose I want a dev (for development) and a prd (for production) environment on the same server, yet in a different directory.
    Assume I am using apache (in my case Uniform server) on windows (for linux the solution is similar).
    Then I have c:\uniform\www as my root dir with prd and dev as subdirs.
    If you have the two environments together you can have a serious, the scenario:
    I login on dev and then change the url to one with prd in it. That basically means that anyone can simply get into the other enronment.
    This is of course not preferred. Another issue is that you can not login to dev AND prd on the same browser (different browser tab) and work on both
    together. So there is a simple solution for this. scriptcase allows its own session management via databases and so on. But that is basically more work then the
    solution below.

    Scriptcase uses session_start to start a php session. Standard in php the session is stored in the PHPSESSID cookie. So what if I can store the info in a cookie
    that depends on the path?
    Well that seems quite possible. The solution to this is in the .htaccess files.
    I add to c:\uniform\www\prd the following .htaccess file:
    php_value session.name "PRDSESSID"

    and in c:\uniform\wwwdev the following .htaccess file:
    php_value session.name "DEVSESSID"

    For this to work the root path c:/uniserver/www normally contains:
    <Directory "c:/UniServer/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important. Please see
    # http://httpd.apache.org/docs/trunk/m...e.html#options
    # for more information.
    #
    #Options Indexes FollowSymLinks
    Options Indexes Includes

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
    </Directory>

    So for uniform this already works
    For some others you may need to explicitly set: AllowOverride All and Require all granted
    If these are missing then you need to add them.
    For more details look at: http://httpd.apache.org/docs/trunk/m...uthz_core.html
    and http://httpd.apache.org/docs/current...#allowoverride

    That is basically it..

  • #2
    Thanks for sharing the link and your tips
    atlantarhinoplastycritic.com

    Comment


    • #3
      Originally posted by rr View Post
      So for uniform this already works
      Your SC 7.1 IDE works with UniformServer? What about the zend runtime?
      Best regards: - Reinhard -

      I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

      Comment


      • #4
        Originally posted by RHS View Post
        Your SC 7.1 IDE works with UniformServer? What about the zend runtime?
        No Reinhard, our development still runs on the Scriptcase Apache. This is about our hosting of our DTAP environtment on the same server. We develop an application on SC then deploy it to the T environment, test it than we move it to the acceptance environment to let the end-user test it. But all is running on the same server.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Originally posted by aducom View Post
          No Reinhard, our development still runs on the Scriptcase Apache.
          I also thought what I do wrong ...
          Best regards: - Reinhard -

          I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

          Comment

          Working...
          X