Local Community

How to create and modify site.conf

Can not figure out how to use site.conf

I created a custom site with nginx and php 8.1.9. Site functioning ok, no problems but i would like to make some changes to the site.conf which i do not have. I created one manually in the conf/nginx folder but it is not working.

I even tried adding changes to site.conf.hbs but still nothing. I’m attempting to load images from production.
I tried with this code:
# Load media in /uploads/ from remote site.
location ~ ^/wp-content/uploads/(.) {
rewrite ^/wp-content/uploads/(.
)$ https://site.se/wp-content/uploads/$1 permanent;
}

System Details

  • Local 6.4.3
  • MacOS Ventura 13.01

Hi @emmigereb! After making any adjustments, be sure to stop the site and re-start it so that Local can compile and use those new settings. Have you tried that or saving changes and then restarting Local completely to see if they take?

Thanks for answering.
Saved, restarted site, even Local. site.conf not working at all and adding this to site.conf.hbs does not work either (still shows local images):

Load media in /uploads/ from remote site.

location ~ ^/wp-content/uploads/(.) {
rewrite ^/wp-content/uploads/(.
)$ https://site.se/wp-content/uploads/$1 permanent;
}

I am wondering, do i have to create site.conf manually like i did or it should be created automatically?