Questions tagged [config]

Craft configuration and settings.

Filter by
Sorted by
Tagged with
11
votes
3answers
2k views

How to set up {siteUrl} to work with both http and https

I'm looking for a way to set up the general.php file's siteUrl to be able to use both http and https. Only the front-end login would be using the https. This is how I currently have it set up: '...
10
votes
1answer
2k views

Are there any intentions to release multisite support for Craft?

We're currently using a single ExpressionEngine install with MultiSite Manager to serve up 11 total sites that share the same database. After investigating Craft, and asking questions via Twitter it ...
9
votes
1answer
2k views

Load balancing nodes configuration (3 Craft nodes behind F5 Big-IP)

Craft deployed and working well on one node. Now looking into load balancing 3 nodes behind a LTM device (F5 Big-IP). The server environment is the following: a GlusterFS replicated "shared" file-...
6
votes
1answer
952 views

Bootstrap Craft from another app

Is there any known way to bootstrap Craft to use the core functions inside another application? For example, in Magento anyone can include a file, initialize the app and use all the functions from ...
13
votes
6answers
12k views

When uploading assets what determines the maximum file size?

When I upload an asset I get an alert window stating my file size is to large. I have increased the file size in the general.php config file larger than the file size, however I keep getting a error. ...
11
votes
2answers
656 views

Can I change the list of available locales?

Is it possible, by any method, to change the list of available locales? The current list includes some strange entries, e.g. East Germany, and we would like to update this to be more current for our ...
8
votes
1answer
1k views

Query table in a different database

I'm writing another plugin for my craft app, this time I'm attempting to reuse a MySQL table that's used by other applications as well. I've a class extending the BaseRecord, and getTableName() will ...
4
votes
2answers
3k views

CSS is not loading on staging server

I'm quite new to server config, so this might be a simple mistake. I have a local environment setup on my computer that works just fine. I uploaded my project to my staging server at AWS and the only ...
4
votes
3answers
2k views

Getting "Session Ended" popup in admin

Every minute or so I get the "Your session has ended" popup in the admin. Entering my password just pops the message back up. If I reload the page I'm still logged in. I'm running Craft in vagrant so ...
3
votes
1answer
253 views

How can I set the "activateAccountSuccessPath" for users with Control Panel access?

I have a site that allows public registration, and I want to be able to control where users are redirected to after activating their account. However the default user group has access to the Control ...
2
votes
2answers
228 views

Cleanup Craft Logs

Whenever I have PHP problems I'm looking into the Craft CMS logs. However, at first I noticed there's a ton of stuff getting logged which is useless for me. Under this amount of logs, I can't find ...
15
votes
1answer
8k views

What's the recommended way to include vendor library dependencies in your plugins?

My plugin requires vendor library dependencies and api keys set. What is the recommended way to register an external library? I would also like to configure the public api keys separately for stage ...
4
votes
2answers
7k views

Craft 3: how can I set dynamic Base URL in sites setting?

Sites localized versions are setup using Base URL like this: — http://{baseUrl}/en/ — http://{baseUrl}/fr/ But {baseUrl} variables are not transformed using craft.app.sites.getAllSites(). {% set ...
11
votes
2answers
5k views

grab 'environmentVariables' with a tag

'dev' => array( 'siteUrl' => array( 'de_ch' => 'http://blabla.dev/', 'en' => 'http://blabla.dev/en/', ), 'environmentVariables' => array( ...
5
votes
3answers
1k views

Multi-environment configs and running sites on different ports

In my studio, we have successfully used multi-environment config files to allow several machines on our local network to use local MAMP installs as well as designate dev and production environments at ...
9
votes
2answers
800 views

How can I run the Control Panel from a separate domain?

Is it possible to separate the public site and the Control Panel on separate domains (i.e. www.domain.com and admin.domain.com)? With baseCpUrl you're able to force the admin URL to admin.domain.com, ...
6
votes
3answers
1k views

Multi-locale pages 404 on subdirectories

I'm developing and running a Craft site locally through Laravel Homestead and am having issues with pages 404'ing in a multi-locale setup. I've followed this guide closely: https://craftcms.com/docs/...
5
votes
1answer
2k views

Getting environmental variable via plugin

A similar question was answered before, but I was wonder how I might be able to return the same query from within a plugin (php)? Convert this: {{ craft.config.environmentVariables.baseUrl }} To ...
3
votes
1answer
3k views

Custom template location

First Craft install so please excuse me if this is a newbie Q. Templates are in /craft/templates. Is it possible to move those to a different location? Our other sites (EE) have templates stored with ...
2
votes
2answers
542 views

Auto-login on account activation

Anybody got any suggestions on debugging autoLoginAfterAccountActivation and activateAccountSuccessPath not working? These are set in general.php of my config but when a user activates their account ...
2
votes
1answer
615 views

Recommended way to include API keys in a multi-environment configuration?

What is the recommended way to configure public api keys for multi-environment configurations (i.e. local, dev, stage, production)? Is there a way to set these in either the craft/config/general.php ...
2
votes
1answer
1k views

omitScriptNameInUrls is not working

I think I've just about hit my wits end here. I'm trying to get set up on a new Rackspace server and I can't seem to get my URL rewriting to work properly. Here's what I got so far: My Craft install ...
1
vote
2answers
687 views

Solution to default template with all possible fields and determine position

Banging my head on this one and have not been able to come up with a solution to this. I'm wanting to create a default template for all single entries that checks for all of the fields I have created ...
7
votes
3answers
3k views

URL rewrite not working

For some reason the CraftCMS URL rewrite is not working on GoDaddy shared hosting server. Currently by .htaccess file looks like this Options +FollowSymLinks -Multiviews <IfModule mod_rewrite.c&...
4
votes
1answer
440 views

How can I disable sessions for most of my Craft site?

We're running a craftcms-backed site that uses sessions only for the admin pages. For a few reasons, we'd like to disable session logic for all other urls: the Set-Cookie header that craft uses to ...
4
votes
4answers
976 views

Is it possible to stop Craft from logging so much?

I've got a Craft CMS installation that is set to production mode. I notice that my logs get flooded with a bunch of entries which don't seem very useful. For example, in a matter of several days, I'...
4
votes
1answer
844 views

How can I ensure using actionUrl in my template does not show script name in the generated URL?

I have an controller action in my custom plugin that processes Paypal IPN requests. How it works is that you provide a URL for Paypal to send it's notification requests to and then process them and ...
3
votes
1answer
467 views

Errors with Craft 2.3, Imagine and Imagick

Does anyone else have the same issue? Post the recent Craft 2.3 update all image transforms on my server (about 6 craft sites now) are throwing errors on new transforms. Specifically write errors ...
3
votes
1answer
2k views

How do I make site links relative?

To get around a temporary issue where two urls go to the same site, I wanted to set all my site links to be relative rather than using the full url. Looking through the Craft docs I found that it's ...
3
votes
1answer
675 views

Environment Variable siteURL ignored

In my general.php file I have a siteUrl environment variable declared: 'ontherocks.dev' => array( 'devMode' => true, 'environmentVariables' => array( 'siteUrl' => 'http://...
3
votes
2answers
358 views

Unable to activate trial licence

I would like to test out Craft Pro to see if it would be a good fit for my next project. I have one issue. I have followed the instructions to install Craft CMS @ http://site1.craft.dev - but am ...
2
votes
1answer
234 views

Plugin Multi-Environment config not working

I have set up the plugin's multi-environment configuration as outlined in this answer. The config.php file for the plugin is as follows: <?php return array( // All '*' => array( ),...
2
votes
1answer
589 views

Subdomain database configuration picking up root domain config

So I have this example database config setup $customDbConfig = array( '*' => array( 'tablePrefix' => 'craft', ), 'test1.foo.com' => array( 'server' => '...
2
votes
1answer
995 views

Mcrypt is required on Ubuntu 14.04

I am using Craft on Ubuntu 12.04 servers without problems, but when trying to run it on Ubuntu 14.04 (trusty) I always get the message Mcrypt is required. I installed it, however, via... apt-get ...
1
vote
1answer
1k views

Invalid path alias

I'm not sure if I understand the alias concept entirely So I want to create an alias. I write a variable into my .env File: SITE_URL_DE="http://hello.local" Then I put it into my general.php File:...
1
vote
1answer
325 views

Craft 3 large log file sizes

I've noticed that Craft 3 log files in storage/logs e.g. web-404s.log and web.log don't seem to have a max size or rotate like with Craft 2. The web-404s.log file is nearly 10 megs for 1 site now. ...