Local 5.0.5 - Custom nginx paths

Hi,

We (my colleagues and I) have been using Local for awhile, and today I was looking to migrate from version 3 to 5. We are not using the default Wordpress folder structure but a custom one that works for us and I believe many other companies might be doing this as well (i.e. when using composer to install and update wordpress or when using additional frameworks).

In Local 3.x I would edit the nginx configuration to suit our needs, but in this new version of Local everything has been migrated to .hbs files, are the values of these hbs vars abstracted to a place where we can not edit them, i.e. root {{root}}? Even completely replacing them with a string value doesn’t seem to work, is whatever is inserted in {{root}} being appended to a different path?

Advise would be appreciated :slight_smile:

Robert

Interesting question.
Can’t answer but am interested in knowing how to deal with that too :slight_smile:

The Nginx files appear to be in Application Support/Local/run/router/nginx (Mac) unfortunately changing anything there won’t work since they get rebuild every time you start the project. If you change the root attribute on site.conf.hbs to a absolute path to your folder say:

root   "/Users/your-user/Local Sites/test-website/app/custom-folder/htdocs";

It will work but it’s ugly and tedious. Unfortunatly going up a directory with nginx is not possible (not with just nginx anyway) for something like this:

root   {{root}}/../custom-folder/htdocs;

Would be nice if you could change the root variable or just point Local to the place it should look for the index.php.

With Local 3.x this was all you had to do:

root /app/your-folder/htdocs;