Nginx Virtual Hosts Config

Questions about HTTP Access/Mods may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
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 !

Post Reply

Return to “HTTP/Apache Mods”