Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Using the same environment setup files in two different domains

Solved by Rferreira View solution

Started by Rferreira 2 years ago · 4 replies · 142 views
2 years ago

Hi all!

I have a Grav website installed on a domain, let's say grav.local. For security reasons, I can only access the admin using this domain, but this website is publicly accessible on another domain, let's say grav.com.

Grav, as expected, created two env folders, one for grav.local and another for grav.com. The problem is that I can only edit the grav.local files, as mentioned above.

How can I point to the configs of grav.local when accessing grav.com? Or in another words, can I get rid of the environments and have a single folder with configs, no matter the environment?

Thanks in advance!

2 years ago

I did @Karmalakas , and I'm using them to separate configs between dev, quality and production environments.

My issue is with production, where the company hosting the website forces me to make edits in one domain (grav.local) that's behind a VPN but the public facing address is grav.com, so environments won't work here I believe since updates on grav.local don't show up in grav.com.

So the question is: can I get rid of environments in production and just have a single config folder used by all domains?

Thanks!

2 years ago

From the docs I understand you can define the environment via config on each server. So if you define same env in both cases, it should work.

Sorry, didn't try myself, so I might be mistaken

2 years ago Solution

I ended up going with the simpler route, no envs and just using the default config. Like this, no matter the URL, they all use the same config.
Thanks for the help @Karmalakas!

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 53 9 hours ago
Support · by Anna, 3 days ago
2 59 12 hours ago
Support · by Justin Young, 13 hours ago
1 30 13 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago