Problems with NGINX, rewrites and VVV

I’m at the end of my rope and horribly stuck.

I’m trying to get a development environment working with VVV and SOIL. I know that some magic is going to come out in october but I want to get developing now.

I can’t get the NGINX configuration to work with the rewrites. I’ve gone into the configs and found every instance I can find of location ~ \.php$ and pasted the relevant location directives before that. Then restarted using sudo kill -HUP 'cat /var/run/' (those are really backticks but Markdown get confused). So the server should be suitably restarted with the new configs. Checking the PIDs tells me that things have changed.

I then copy the mu-plugins, plugins and theme directories form soil into my vagrant, run npm install and grunt watch and check for the assets directories for the files. They’re all there. The theme, when enabled (choosing default values from the dropdowns) does NOT show the css or vendored JS. They all get 404 errors. Moreover, I can get the files going through wp-content/theme/roots…

Any ideas what i’m doing wrong?

Just to clarify, did you use the nginx config as detailed in Roots 101? (can’t post a link for some reason)

Also, running grunt watch will not compile the files unless you make a change some where. It is best to run grunt first for all of the files be compiled.

Disregrad the above about grunt/grunt watch. I must have not fully understood your post. I can’t think of what could be wrong if the files truly are there. I’ve had similar issues with rewrites but usually a restart would do the trick.

Try debugging your configs

PS. I have never seen that way of restarting Nginx. What are the benefits? I usually use sudo service nginx reload or sudo service nginx restart

For some reason Discourse isn’t properly promoting users to the next level, everyone is still a “new user” when you should definitely not be (based off what the settings are). I just manually set you to “basic” for now

1 Like

Thanks Ben!
I’m seeing a host of new options now :slight_smile:

Despite that minor bug, I am absolutely loving Discourse so thank you so much for introducing it. I plan on using it in the future.


Thanks for your help. I’m not sure what I did, or where I copied things from (I was sure it was from Roots 101) but the try_files had wp-content/themes/sitename/… and since the files were not there it happily failed silently.

Things would be so much easier if computers did what I mean not what I say.

Thanks again.

Oh yes, I had a problem with that when I changed the name of the theme :slight_smile: I wish I remembered earlier so I could point you in the right direction.

I think at some point in our lifetime computers will start correcting us. Actually, Google already does. Hm, I don’t remember getting a rude “Did you mean…” in quite a while. I think they switched to just showing you the results they think you want to see.