Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

[SOLVED] Lost in config-files

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
ZipperZapper
Posts: 13
Joined: Fri Feb 06, 2015 11:37 am

[SOLVED] Lost in config-files
  • Quote

Post by ZipperZapper » Sat Aug 15, 2015 9:35 am

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.
Last edited by ZipperZapper on Sat Aug 15, 2015 10:44 pm, edited 1 time in total.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Lost in config-files
  • Quote

Post by skurudo » Sat Aug 15, 2015 12:44 pm

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?
Top

ZipperZapper
Posts: 13
Joined: Fri Feb 06, 2015 11:37 am

Re: Lost in config-files
  • Quote

Post by ZipperZapper » Sat Aug 15, 2015 3:33 pm

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?
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Lost in config-files
  • Quote

Post by skurudo » Sat Aug 15, 2015 7:07 pm

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
Top

ZipperZapper
Posts: 13
Joined: Fri Feb 06, 2015 11:37 am

Re: Lost in config-files
  • Quote

Post by ZipperZapper » Sat Aug 15, 2015 9:17 pm

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.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Lost in config-files
  • Quote

Post by tjebbeke » Sat Aug 15, 2015 10:07 pm

In this dir you can find the templates
/usr/local/vesta/data/templates/web/nginx
Top

ZipperZapper
Posts: 13
Joined: Fri Feb 06, 2015 11:37 am

Re: Lost in config-files
  • Quote

Post by ZipperZapper » Sat Aug 15, 2015 10:35 pm

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.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Lost in config-files
  • Quote

Post by skurudo » Sun Aug 16, 2015 7:01 am

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.
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password