Next: Themes More: Bootstrap

BMC/UUP-SITE - Setup

Setting up a new instance can be done by bootstrap, composer or unpack archive. It's recommended to use the uup-site.sh script to perform most tasks.

uup-site.sh --bootstrap
uup-site.sh --setup

Custom location

Use the --location option for setting up for another location than '/'. Notice that the location must have leading and trailing slashes:

uup-site.sh --location /api/soap/ --setup

Directory layout

The generated directory structure will look like this:

.
├── composer.json
├── composer.lock
├── config
│   ├── apache.conf
│   └── defaults.site
├── public
│   ├── dispatch.php
│   ├── fragment
│   ├── index.php
│   ├── standard.menu
│   ├── theme
│   │   └── default
│   ├── view.php
│   └── welcome.php
├── template
│   └── default
│       ├── footer.inc
│       ├── format.inc
│       ├── header.inc
│       ├── standard.ui
│       └── welcome.ui
└── vendor
    ├── autoload.php
    ├── bin
    │   └── uup-site.sh -> ../bmc/uup-site/uup-site.sh
    ├── bmc
    │   └── uup-site
    └── composer

Cleanup

The fragment directory and example scripts can be removed. These are only installed for testing the site after setup:

( cd public && rm -rf fragment && rm -f index.php view.php welcome.php standard.menu )

Only expose public

Despite which method you chose to use, you should always make sure that only the public directory is exposed to outside world.

Web application (PHP)

Create the source directory for keeping support classes. You can then use these classes from within controllers published under the public directory:

mkdir source

Add a namespace mapping to the composer.json in project root:

"autoload": {
        "psr-0": {
            "MyApp\": "source"
        }
}

Web application (SPA)

You can deploy your web application under public and let uup-site take care of authentication and decoration. A secure page controller can be used in this case that is including the index.html normally used for bootstrapping the web application.