Page 1 of 1

[SOLVED] Lost in config-files

Posted: Sat Aug 15, 2015 9:35 am
by ZipperZapper
Hello,

I'm sorry, this is going to be a very stupid question. I'm totaly lost in all the config files for VestaCP.
I want to block áll websites on my server to be loaded from inside a iframe. For example like this (Nginx):

Code: Select all

add_header X-Frame-Options "SAMEORIGIN";
But where do I add this, so that every website on the server will have this enabled by default (and the 'old' websites after doing a rebuild). Do I have to add id to a Nginx config-file, or to a apache-config file? And which one?

As said, quite a stupid question, but I'm a bit lost in all the different config files located on the server.

Re: Lost in config-files

Posted: Sat Aug 15, 2015 12:44 pm
by skurudo
Context: http, server, location, if in location
http://nginx.org/en/docs/http/ngx_http_ ... add_header
I want to block áll websites on my server to be loaded from inside a iframe.
Who load your sites inside a iframe?

Re: Lost in config-files

Posted: Sat Aug 15, 2015 3:33 pm
by ZipperZapper
Not exactly an answer to the question?

I don't know in which config-file I have to put it to get it applied to every website. Every site has it's own config file in the home directory, there is a vesta.conf in the conf.d in the nginx conf folder, there's a ipaddress.conf file, and there is the nginx.conf file.

Or maybe I need to put it in a Apache file, there are a lot of them too. But I think putting it in Nginx is good enough, isn't it? Like I said, I sometimes get lost in the enormous amount of config files.

Why I want it is not really relevant, is it?

Re: Lost in config-files

Posted: Sat Aug 15, 2015 7:07 pm
by skurudo
ZipperZapper wrote:Not exactly an answer to the question?
Well, I don't really undersstand your final goal and ask some ;-)
ZipperZapper wrote:I don't know in which config-file I have to put it to get it applied to every website. Every site has it's own config file in the home directory, there is a vesta.conf in the conf.d in the nginx conf folder, there's a ipaddress.conf file, and there is the nginx.conf file. Or maybe I need to put it in a Apache file, there are a lot of them too. But I think putting it in Nginx is good enough, isn't it? Like I said, I sometimes get lost in the enormous amount of config files.Why I want it is not really relevant, is it?
Usually this in server section and config file -> /home/your-user/conf/web/nginx.conf

Re: Lost in config-files

Posted: Sat Aug 15, 2015 9:17 pm
by ZipperZapper
skurudo wrote:
ZipperZapper wrote:Not exactly an answer to the question?
Well, I don't really undersstand your final goal and ask some ;-)
Block people from showing my websites in iframes, like Google and Facebook do. That can be done by adding the header from my first post to the server section of nginx config files.
skurudo wrote:Usually this in server section and config file -> /home/your-user/conf/web/nginx.conf
I know, but that's not my question, please read my posts carefully. I want it to be a standard setting. Where are the standard settings? The config files in the user folders are created somewhere? Based on a standard template? I want it to be applied to all my new domains and I want to apply it to my existing domains by doing a rebuild. NOT by edditting all the config files in all the users home directories by hand, that's just stupid.

Re: Lost in config-files

Posted: Sat Aug 15, 2015 10:07 pm
by tjebbeke
In this dir you can find the templates
/usr/local/vesta/data/templates/web/nginx

Re: Lost in config-files

Posted: Sat Aug 15, 2015 10:35 pm
by ZipperZapper
tjebbeke wrote:In this dir you can find the templates
/usr/local/vesta/data/templates/web/nginx
Thanks, I found them! Turns out I had to use the apache config-files to make it work. Sometimes I'm a bit confused as for what goes by Nginx and what goes by Apache.

Thanks for the help. Problem solved.

Re: Lost in config-files

Posted: Sun Aug 16, 2015 7:01 am
by skurudo
ZipperZapper wrote: Block people from showing my websites in iframes, like Google and Facebook do. That can be done by adding the header from my first post to the server section of nginx config files.
Wow, about Facebook I heard, but Google. It's news to me.
ZipperZapper wrote:I know, but that's not my question, please read my posts carefully. I want it to be a standard setting. Where are the standard settings? The config files in the user folders are created somewhere? Based on a standard template? I want it to be applied to all my new domains and I want to apply it to my existing domains by doing a rebuild. NOT by edditting
all the config files in all the users home directories by hand, that's just stupid.
tjebbeke gave answer yet, but there is no telepathy. I can't know for sure it's task for one site or for all sites before you say so clearly.