By samoshi
I know how to setup nginx in Linux. In FreeBsd I thought it’d exactly the same, except maybe a location of the config file. In Linux it’s /etc/nginx/sites-available/default, in FreeBsd /usr/local/etc/nginx/nginx.conf
However, according to a tutorial here, in FreeBsd the config is also quite different: in Linux I’d have 2 sections of “server” for http and https. In FreeBsd there has to be “user” on the top level and number of workers. In other things which are pretty different. Not just paths, but the structure and sections.
Is that really so and they’re indeed different?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @samoshi
Like @CrypticDesigns says, the configuration is not different, but you’re referencing two different config files.
On most Linux, the main Nginx config is /etc/nginx/nginx.conf. On most BSD it’s /usr/local/etc/nginx/nginx.conf.
I don’t have access to a BSD right now, but on Linux the server block configuration is located in /etc/nginx/sites-enabled/ (which is normally a symlink to /etc/nginx/sites-available/. My guess would be that BSD has the same setup, so that would be /usr/local/etc/nginx/sites-enabled.
@hansen thx. On Linux I use " /etc/nginx/sites-available/default" for the config of my website, what is it on FreeBsd?
oh, wait, I’ll check if it’s “/usr/local/etc/nginx/sites-enabled/default” later.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.