IN-004 — Web Store SSL Settings
Overview
The web store supports both HTTP and HTTPS storefront URLs. Whether a store generates secure (https://) or non-secure (http://) URLs is controlled by the ssl_enabled flag stored in the database.
This setting only controls how application URLs are generated. It does not install, renew, or manage SSL certificates on the web server.
For host-level certificates (Zone / Apache), see IN-001 SSL Certificates (Production) and IN-001 SSL (Staging).
Database Configuration
| Property | Value |
|---|---|
| Table | rr_web_store |
| Column | ssl_enabled |
| Data Type | BOOLEAN |
| Default Value | false |
Behavior
ssl_enabled | Generated Base URL |
|---|---|
true | https://{domain} |
false | http://{domain} |
Example
If the store domain is:
web.rahvaraamat.ee
Then:
| ssl_enabled | Generated URL |
|---|---|
true | https://web.rahvaraamat.ee |
false | http://web.rahvaraamat.ee |
Configuration Source
The value is configured during web store initialization using the Yii console command:
php yii web-store/init
During initialization, the setup prompts:
Is SSL enabled for the domain?
The administrator selects:
- Yes →
ssl_enabled = true - No →
ssl_enabled = false
The selected value is then stored in the rr_web_store.ssl_enabled column.
Administration
There is currently no Admin Panel interface for modifying this setting.
To change the SSL behavior:
- Re-run the initialization command, or
- Update the
ssl_enabledvalue directly in the database.
Application Usage
The ssl_enabled flag is referenced throughout the application whenever storefront URLs are generated.
Primary usages include:
- Main Web Store URL generation
- External URL generation
- Wishlist URL generation
- Redirect URL creation
- Legacy URL builder compatibility
- Wishlist serialization
Key application components include:
MainWebStoreUrlManagerExternalUrlHelperOldUrlBuilder- Wishlist Serializer
What This Setting Controls
The ssl_enabled flag determines:
- Protocol used for storefront URLs (
httpvshttps) - Generated redirect URLs
- Wishlist links
- External links generated by the application
- Base URL construction
What This Setting Does NOT Control
This flag does not perform any server-side SSL management.
It does not:
- Install SSL certificates
- Renew SSL certificates
- Configure Apache or Nginx
- Configure HTTPS redirects
- Enable HSTS
- Manage TLS versions
- Configure certificate chains
- Validate certificate expiry
These responsibilities belong to the hosting/server infrastructure (for example, Zone Hosting, Apache, Nginx, or a load balancer).
Technical Flow
rr_web_store.ssl_enabled
│
▼
Read by URL Builder Classes
│
▼
Protocol Selection
│
true ─────► https://domain
false ────► http://domain
│
▼
Generated Store URLs
Notes
- The application assumes that the hosting environment has already been configured correctly for HTTPS.
- If
ssl_enabledis set totruebut the web server does not have a valid SSL certificate, generated HTTPS URLs may not be accessible. - Likewise, if the server supports HTTPS but
ssl_enabledremainsfalse, the application will continue generating HTTP links.
Summary
| Feature | Supported |
|---|---|
| Generate HTTPS URLs | ✅ |
| Generate HTTP URLs | ✅ |
| Controlled by Database | ✅ |
Configurable via web-store/init | ✅ |
| Editable from Admin Panel | ❌ |
| Installs SSL Certificates | ❌ |
| Renews SSL Certificates | ❌ |
| Configures Web Server SSL | ❌ |