[SOLVED] Lost in config-files
-
- Posts: 13
- Joined: Fri Feb 06, 2015 11:37 am
[SOLVED] Lost in config-files
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):
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.
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";
As said, quite a stupid question, but I'm a bit lost in all the different config files located on the server.
Last edited by ZipperZapper on Sat Aug 15, 2015 10:44 pm, edited 1 time in total.
Re: Lost in config-files
Context: http, server, location, if in location
http://nginx.org/en/docs/http/ngx_http_ ... add_header
http://nginx.org/en/docs/http/ngx_http_ ... add_header
Who load your sites inside a iframe?I want to block áll websites on my server to be loaded from inside a iframe.
-
- Posts: 13
- Joined: Fri Feb 06, 2015 11:37 am
Re: Lost in config-files
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?
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
Well, I don't really undersstand your final goal and ask some ;-)ZipperZapper wrote:Not exactly an answer to the question?
Usually this in server section and config file -> /home/your-user/conf/web/nginx.confZipperZapper 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?
-
- Posts: 13
- Joined: Fri Feb 06, 2015 11:37 am
Re: Lost in config-files
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:Well, I don't really undersstand your final goal and ask some ;-)ZipperZapper wrote:Not exactly an answer to the question?
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.skurudo wrote:Usually this in server section and config file -> /home/your-user/conf/web/nginx.conf
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: Lost in config-files
In this dir you can find the templates
/usr/local/vesta/data/templates/web/nginx
/usr/local/vesta/data/templates/web/nginx
-
- Posts: 13
- Joined: Fri Feb 06, 2015 11:37 am
Re: Lost in config-files
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.tjebbeke wrote:In this dir you can find the templates
/usr/local/vesta/data/templates/web/nginx
Thanks for the help. Problem solved.
Re: Lost in config-files
Wow, about Facebook I heard, but Google. It's news to me.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.
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.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.