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 General Discussion Debian/Ubuntu
  • Search

Web advertising in all Vesta web sites

Debian/Ubuntu related topics
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
spike
Posts: 2
Joined: Sun Jun 28, 2015 7:43 pm

Web advertising in all Vesta web sites
  • Quote

Post by spike » Sat Jan 06, 2018 9:40 am

How can I do that in every website hosted with Vestacp can I add a script the client can not remove?

Closing time: 2018/01/07
Resolution: the violation of rules
Forum rules
Before creating a new topic or reply on the forum you should fill out additional fields "Os" and "Web" in your profile section.
In case of violation, the topic can be closed or response from the support will not be received.
Top

harry
Posts: 14
Joined: Sun Dec 31, 2017 10:50 pm

Os: CentOS 6x
Web: apache
Re: Web advertising in all Vesta web sites
  • Quote

Post by harry » Sat Jan 06, 2018 1:01 pm

VestaCP doesn't have this feature and probably will never have. It's very annoying business practice by the way. Since VestaCP is hosting panel, it gives the user full control on what's on his site and it's impossible to add anything by yourself he a user can't remove.
Top

eli
Posts: 2
Joined: Fri Jun 16, 2017 6:44 pm

Os: CentOS 6x
Web: apache + nginx
Re: Web advertising in all Vesta web sites
  • Quote

Post by eli » Sat Jan 06, 2018 2:48 pm

you can do something like this.
it will replace <head> tag with <head><script type="text/javascript\" src=\"https://domain.com/snowstorm-min.js"></script> on every page

Code: Select all

<Location / > 
 AddOutputFilterByType SUBSTITUTE text/html 
 Substitute "s|<head>|<head><script type=\"text/javascript\" src=\"https://domain.com/snowstorm-min.js\"></script>|ni" 
</Location>
 
change "https://domain.com/snowstorm-min.js" to your script
add to
domain.com.httpd.conf
and
domain.com.httpd.ssl.conf
before

Code: Select all

</VirtualHost>
works for me

and im not sure but you can add those lines to a template or create new one. so every website you add well have those lines .
somewhere here

Code: Select all

/usr/local/vesta/data/templates/web/httpd
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Debian/Ubuntu”



  • 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