Answer the question
In order to leave comments, you need to log in
How to set up Laravel Valet and sites on 1c-bitrix?
Hello, I saw in the laravel docs the "development environment" Laravel Valet https://laravel.com/docs/5.4/valet
with laravel itself, everything really works out of the box, also with static sites and with minimal php logic
But I have to deal with with sites on bitrix (and there are 90% of them), no matter how I tried, but I could not configure Valet to work with Bitrix, although it seems to me that this is not about Valet, but more about nginx.
What I did: I read that you can set up valet with any CMS (for this you need to write your own "driver", again, everything is according to the documentation on the Laravel website). I immediately googled this very driver https://github.com/laravel/valet/pull/78/commits
But when I go to the local domain name (test.dev) where the structure is on bitrix, I get an nginix error '
Since Valet does not work on Apache, but on nginix, besides, all other sites work with a bang - the problem is most likely in the nginix config, can you tell me how to modify it or add it so that I can work with sites on Bitrix?
Thanks in advance for your help
Answer the question
In order to leave comments, you need to log in
I understand that it’s already too late, but suddenly it’s useful to someone, of course I use Linux valet, an analogue of Laravel valet but under linux, and the upgrade of that file here helped me with Bitrix using the link like this.
In the first method I changed the check
public function serves($sitePath, $siteName, $uri)
{
return is_dir($sitePath.'/bitrix')
}
public function serves($sitePath, $siteName, $uri)
{
return is_dir($sitePath.'/bitrix') && !file_exists($sitePath.'/'.$uri);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question