Linux server.kiran-academy.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
: 194.233.91.196 | : 216.73.216.216
Cant Read [ /etc/named.conf ]
7.4.32
finalho
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
varnish-5.2.1 /
html /
tutorial /
[ HOME SHELL ]
Name
Size
Permission
Action
backend_servers.html
7.18
KB
-rw-r--r--
index.html
6.35
KB
-rw-r--r--
introduction.html
9.46
KB
-rw-r--r--
now_what.html
5
KB
-rw-r--r--
peculiarities.html
6.91
KB
-rw-r--r--
putting_varnish_on_port_80.htm...
9.66
KB
-rw-r--r--
starting_varnish.html
8.66
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : putting_varnish_on_port_80.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Put Varnish on port 80 — Varnish version 5.2.1 documentation</title> <link rel="stylesheet" href="../_static/classic.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '5.2.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="top" title="Varnish version 5.2.1 documentation" href="../index.html" /> <link rel="up" title="The Varnish Tutorial" href="index.html" /> <link rel="next" title="Backend servers" href="backend_servers.html" /> <link rel="prev" title="Starting Varnish" href="starting_varnish.html" /> </head> <body role="document"> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="backend_servers.html" title="Backend servers" accesskey="N">next</a> |</li> <li class="right" > <a href="starting_varnish.html" title="Starting Varnish" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Varnish version 5.2.1 documentation</a> »</li> <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">The Varnish Tutorial</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="put-varnish-on-port-80"> <h1>Put Varnish on port 80<a class="headerlink" href="#put-varnish-on-port-80" title="Permalink to this headline">¶</a></h1> <p>Until now we've been running with Varnish on a high port which is great for testing purposes. Let's now put Varnish on the default HTTP port 80.</p> <p>First we stop varnish: <code class="docutils literal"><span class="pre">service</span> <span class="pre">varnish</span> <span class="pre">stop</span></code></p> <p>Now we need to edit the configuration file that starts Varnish.</p> <div class="section" id="debian-ubuntu-legacy"> <h2>Debian/Ubuntu (legacy)<a class="headerlink" href="#debian-ubuntu-legacy" title="Permalink to this headline">¶</a></h2> <p>On older Debian/Ubuntu this is <cite>/etc/default/varnish</cite>. In the file you'll find some text that looks like this:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">DAEMON_OPTS</span><span class="o">=</span><span class="s2">"-a :6081 </span><span class="se">\</span> <span class="s2"> -T localhost:6082 </span><span class="se">\</span> <span class="s2"> -f /etc/varnish/default.vcl </span><span class="se">\</span> <span class="s2"> -S /etc/varnish/secret </span><span class="se">\</span> <span class="s2"> -s malloc,256m"</span> </pre></div> </div> <p>Change it to:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">DAEMON_OPTS</span><span class="o">=</span><span class="s2">"-a :80 </span><span class="se">\</span> <span class="s2"> -T localhost:6082 </span><span class="se">\</span> <span class="s2"> -f /etc/varnish/default.vcl </span><span class="se">\</span> <span class="s2"> -S /etc/varnish/secret </span><span class="se">\</span> <span class="s2"> -s malloc,256m"</span> </pre></div> </div> </div> <div class="section" id="debian-v8-ubuntu-v15-04"> <h2>Debian (v8+) / Ubuntu (v15.04+)<a class="headerlink" href="#debian-v8-ubuntu-v15-04" title="Permalink to this headline">¶</a></h2> <p>On more recent Debian and Ubuntu systems this is configured in the systemd service file.</p> <p>Applying changes to the default service is best done by creating a new file <cite>/etc/systemd/system/varnish.service.d/customexec.conf</cite>:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">Service</span><span class="p">]</span> <span class="n">ExecStart</span><span class="o">=</span> <span class="n">ExecStart</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">sbin</span><span class="o">/</span><span class="n">varnishd</span> <span class="o">-</span><span class="n">a</span> <span class="p">:</span><span class="mi">80</span> <span class="o">-</span><span class="n">T</span> <span class="n">localhost</span><span class="p">:</span><span class="mi">6082</span> <span class="o">-</span><span class="n">f</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">varnish</span><span class="o">/</span><span class="n">default</span><span class="o">.</span><span class="n">vcl</span> <span class="o">-</span><span class="n">S</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">varnish</span><span class="o">/</span><span class="n">secret</span> <span class="o">-</span><span class="n">s</span> <span class="n">malloc</span><span class="p">,</span><span class="mi">256</span><span class="n">m</span> </pre></div> </div> <p>This will override the ExecStart part of the default configuration shipped with Varnish Cache.</p> <p>Run <code class="docutils literal"><span class="pre">systemctl</span> <span class="pre">daemon-reload</span></code> to make sure systemd picks up the new configuration before restarting Varnish.</p> </div> <div class="section" id="red-hat-enterprise-linux-centos"> <h2>Red Hat Enterprise Linux / CentOS<a class="headerlink" href="#red-hat-enterprise-linux-centos" title="Permalink to this headline">¶</a></h2> <p>On Red Hat/CentOS you can find a similar configuration file in <cite>/etc/sysconfig/varnish</cite>.</p> </div> </div> <div class="section" id="restarting-varnish-again"> <h1>Restarting Varnish again<a class="headerlink" href="#restarting-varnish-again" title="Permalink to this headline">¶</a></h1> <p>Once the change is done, restart Varnish: <code class="docutils literal"><span class="pre">service</span> <span class="pre">varnish</span> <span class="pre">start</span></code>.</p> <p>Now everyone accessing your site will be accessing through Varnish.</p> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Put Varnish on port 80</a><ul> <li><a class="reference internal" href="#debian-ubuntu-legacy">Debian/Ubuntu (legacy)</a></li> <li><a class="reference internal" href="#debian-v8-ubuntu-v15-04">Debian (v8+) / Ubuntu (v15.04+)</a></li> <li><a class="reference internal" href="#red-hat-enterprise-linux-centos">Red Hat Enterprise Linux / CentOS</a></li> </ul> </li> <li><a class="reference internal" href="#restarting-varnish-again">Restarting Varnish again</a></li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="starting_varnish.html" title="previous chapter">Starting Varnish</a></p> <h4>Next topic</h4> <p class="topless"><a href="backend_servers.html" title="next chapter">Backend servers</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/tutorial/putting_varnish_on_port_80.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="backend_servers.html" title="Backend servers" >next</a> |</li> <li class="right" > <a href="starting_varnish.html" title="Starting Varnish" >previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Varnish version 5.2.1 documentation</a> »</li> <li class="nav-item nav-item-1"><a href="index.html" >The Varnish Tutorial</a> »</li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2010-2014, Varnish Software AS. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. </div> </body> </html>
Close