Reputation: 702
In my host i got private folder and web folder. To run php outside the web directory i need to put everything in the private folder. See the picture. App,src, vendor, logs, bin to be in the private folder.
I realize that the bootstrap app.php and app_dev.php need to point to the private folder
$loader = require_once __DIR__.'/../private/app/bootstrap.php.cache';
Debug::enable();
require_once __DIR__.'/../private/app/AppKernel.php';
But i cannot run the server:run command and i don't know all the steps when you move all those folders for configuration.
Upvotes: 0
Views: 741
Reputation: 789
You have few things to finish your work.
You must change your composer.json
.
Replace values in your composer.json
with this:
{
"autoload": {
"psr-4": {
"": "private/src/",
"SymfonyStandard\\": "private/app/SymfonyStandard/"
}
},
"config": {
"vendor-dir": "private/vendor"
},
"extra": {
"symfony-app-dir": "private\\app",
"symfony-web-dir": "private\\web"
}
}
Remove your vendor
folders and do composer update
.
To finish, just add --docroot
at your server:run
command:
app/console server:run --docroot=/home/workspace/...
Upvotes: 1