Nginx Virtual Hosts Config

Questions about HTTP Access/Mods may go here
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
Zerreth
I'm New!
I'm New!
Posts: 2
Joined: Mon Dec 11, 2017 1:24 am

Nginx Virtual Hosts Config

Unread post by Zerreth » Mon Dec 11, 2017 1:31 am

So I'm making changes to the nginx config file to setup rewrite rules, ssi and such:
/etc/nginx/app.d/server.webstation-vhost.conf

However, Web Station will overwrite this file every time it is opened. :roll:
What is the proper location for the virtual hosts config file that won't get overwritten ?
I can see that another config file is included via the said directive, will that one override previous commands ?

/usr/local/etc/nginx/conf.d/SOME UID/user.conf

Thanks.

Zerreth
I'm New!
I'm New!
Posts: 2
Joined: Mon Dec 11, 2017 1:24 am

Re: Nginx Virtual Hosts Config

Unread post by Zerreth » Tue Dec 12, 2017 12:38 am

Figured it out. Simply stop using WebStation Virtual hosts (remove them to avoid duplicates) and set up your own in:

Code: Select all

/etc/nginx/sites-enabled 
Example: /etc/nginx/sites-enabled/Z4.conf

Code: Select all

server
{
    listen ...
    server_name Z4;
    root ...
    index ...
    ...more stuff
}
and to reload

Code: Select all

nginx -s reload
JOY, no more autogenerated frustration !

Locked

Return to “HTTP/Apache Mods”