Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Install Varnish in front of Apache: let Varnish listen on the public HTTP port 80, move Apache to an origin-only port such as 8080, and point /etc/varnish/default.vcl at Apache’s actual address. Apache continues to generate responses; Varnish becomes the front-end HTTP cache. On Debian or Ubuntu, the essential sequence is to change Apache’s Listen and every enabled virtual-host binding, configure the VCL backend, update the systemd unit, run systemctl daemon-reload, restart Varnish, and test both layers independently.

How the Apache–Varnish arrangement works

Varnish is a reverse proxy and HTTP cache, not a replacement for Apache. A browser connects to Varnish on port 80. Varnish checks its cache; when it needs a fresh response, it makes a backend request to Apache. Apache is the origin server that executes application code, reads files, and returns the response. Varnish can then serve an eligible response directly on later requests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Client ── HTTP :80 ──> Varnish ── HTTP :8080 ──> Apache (origin)

On one machine, the two daemons cannot both bind the same address and port. The normal arrangement is therefore:

Component Role Typical same-host binding
Varnish Public reverse proxy and cache :80
Apache Origin web server :8080

The port numbers are conventions, not requirements. You may use another unused origin port, but Apache’s listeners, all virtual hosts, the VCL backend, firewall rules, health checks, and any local monitoring must agree.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Plan the deployment before changing ports

Confirm the current Apache site works

Open the site directly through Apache before introducing Varnish. This gives you a known-good origin and prevents a cache configuration from hiding an existing Apache or application failure. Record the enabled sites, included configuration files, TLS termination point, and any local services that currently call Apache on port 80.

After the move, your direct-origin test will use port 8080. A failure there is an Apache or application problem; a failure only through port 80 is a Varnish, listener, or routing problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Decide where TLS ends

The minimal procedure below is for HTTP on port 80. If another reverse proxy or load balancer terminates HTTPS, it can forward HTTP to Varnish, while Varnish forwards HTTP to Apache. Document the actual chain and preserve the original host and client-information headers according to your proxy design. Do not assume that installing Varnish by itself creates an HTTPS listener.

Choose an origin address

For a same-host installation, 127.0.0.1:8080 limits the backend connection to the local machine. For a separate origin host, use the origin’s reachable address and port, and make sure network policy permits Varnish to connect to it. Varnish’s backend definition must identify a host or a path, not both; the usual TCP setup uses .host and .port.

Install Varnish on Debian or Ubuntu

1. Install the package

  1. Update package metadata:
    sudo apt-get update
  2. Install Varnish:
    sudo apt-get install varnish

Do not move Apache’s port until you have confirmed which configuration files are active. Package layouts and local administration practices can differ, so inspect the installed service definition rather than replacing it wholesale.

2. Move Apache from port 80 to port 8080

Edit /etc/apache2/ports.conf and change the HTTP listener:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Listen 8080

Next, change every enabled HTTP virtual host from port 80 to port 8080. A typical declaration changes from:

<VirtualHost *:80>
    ServerName example.test
    # existing directives
</VirtualHost>

to:

<VirtualHost *:8080>
    ServerName example.test
    # existing directives
</VirtualHost>

Search all included and enabled files, not just the first site. A missed virtual host can leave Apache attempting to bind port 80, or can cause requests arriving from Varnish to select the wrong site. Check for additional address-specific declarations such as <VirtualHost 192.0.2.10:80> and change those consistently.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Before restarting, validate Apache’s merged configuration:

sudo apachectl configtest

Restart Apache after the port edits:

sudo systemctl restart apache2

Test the origin directly on its new port. For a name-based site, send the intended Host header:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -I -H 'Host: example.test' http://127.0.0.1:8080/

The command is an operational check, not a published performance test. It should reach Apache without involving Varnish.

3. Configure the VCL backend

Edit /etc/varnish/default.vcl. For Apache on the same host, a minimal VCL 4.1 backend is:

vcl 4.1;

backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

The backend port must exactly match Apache’s listener. If Apache is on another machine, replace 127.0.0.1 with the origin address that Varnish can reach. A hostname is also valid, but its address is resolved when VCL is compiled. If DNS later points that hostname at a different address, reload or restart Varnish so the VCL is compiled again; merely waiting for DNS propagation does not update an already loaded VCL.

Keep this minimal backend until traffic flows. Add caching rules, health probes, authentication exceptions, or multiple backends only after the basic path is working. A backend must use either a .host or a .path attribute, not both.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Make Varnish listen on port 80

Varnish’s systemd service must launch the daemon with a listener argument equivalent to -a :80 and load /etc/varnish/default.vcl. The exact unit syntax is distribution-dependent. Inspect the packaged unit first, then edit the supported configuration location or create a systemd drop-in override. Preserve the distribution’s other required arguments; do not copy a short example over a complete vendor unit and accidentally remove runtime, storage, security, or logging settings.

The effective command line should contain the equivalent of:

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
-a :80
-f /etc/varnish/default.vcl

Port 80 must be free before Varnish starts. If Apache still has any Listen 80 directive or virtual host bound to :80, Varnish cannot bind that port.

5. Reload systemd and restart Varnish

When you edit a unit file or a drop-in, tell systemd to reread it before restarting the service:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl daemon-reload
sudo systemctl restart varnish

daemon-reload is required for service-file changes. It is not a substitute for restarting Varnish after changing the VCL itself; restart Varnish, or use the distribution’s supported VCL reload mechanism, so the new configuration is compiled and loaded.

Verify both services independently

Check service state and listeners

sudo systemctl status apache2 varnish
sudo ss -ltnp

Confirm that Apache owns the origin port (normally 127.0.0.1:8080 or the intended address) and Varnish owns port 80. If the output shows Apache on port 80, stop and correct the remaining Apache listener before troubleshooting Varnish.

Test the origin, then the public listener

  1. Request Apache directly on port 8080, using the correct Host header if the site is name-based:
    curl -i -H 'Host: example.test' http://127.0.0.1:8080/
  2. Request the same site through Varnish on port 80:
    curl -i -H 'Host: example.test' http://127.0.0.1/

Run the tests in that order. If the first fails, fix Apache, the virtual-host selection, or the application. If the first succeeds and the second fails, inspect Varnish’s listener, VCL backend, and service logs. Repeat with a static path and an application path when you need to distinguish web-server routing from application behavior.

RHEL-compatible installation

On RHEL-compatible systems, use the Varnish repository and the distribution’s package workflow documented for that platform. The file locations differ from Debian-based systems: Apache configuration is normally under /etc/httpd, and the service is commonly named httpd. The architecture and order of operations remain the same:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Install Varnish using the repository and package workflow for the target release.
  2. Confirm Apache serves the site directly.
  3. Change Apache’s HTTP listener and every enabled virtual-host binding to port 8080 under /etc/httpd.
  4. Set the VCL backend to the real Apache address and port.
  5. Configure Varnish’s listener for port 80 while retaining the package unit’s other required arguments.
  6. Run sudo systemctl daemon-reload after unit or drop-in edits.
  7. Restart Varnish and the Apache service as appropriate, then check each service and its listener separately.

Use the platform’s own configuration-validation command before restarting Apache. Do not assume that a Debian path such as /etc/apache2/ports.conf exists on RHEL-compatible systems.

Configuration choices that change the design

Decision Minimal choice What changes when you choose the other option
Origin location Same host, 127.0.0.1:8080 A separate origin requires routable addressing, firewall access, and a backend address that Varnish can reach.
TLS termination HTTP-only Varnish listener If another proxy terminates TLS, define that proxy-to-Varnish hop and ensure the original host and scheme information are handled consistently.
Backend count One default backend Several backends require explicit routing, failover or load-balancing policy, and health-check decisions.
Service management Package-managed unit A local systemd override is safer than replacing a vendor unit, but it still requires daemon-reload after edits.
Backend naming Numeric/local address A hostname is convenient, but address resolution occurs when VCL is compiled; reload VCL after DNS changes.

Same host versus a separate origin

A same-host origin minimizes network dependencies and makes 127.0.0.1 an unambiguous backend target. A separate origin can isolate workloads or support an existing tiered architecture, but you must account for routing, firewall policy, failures between machines, and the origin’s virtual-host selection. In either design, test the backend address from the Varnish host, not merely from your workstation.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

One backend versus a cluster

One backend is appropriate for the initial Apache installation and makes a 503 diagnosis straightforward. Multiple backends can support failover or load distribution, but Varnish needs explicit rules describing which requests use which backend and how an unhealthy backend is detected. Those decisions are separate from moving Apache behind Varnish; do not add them before the single-origin path is verified.

Numeric address versus hostname

A numeric address avoids ambiguity about which address was compiled into the VCL. A hostname can be easier to maintain when origin addresses change, but Varnish resolves it during VCL compilation. After a DNS change, reload the VCL or restart Varnish. Otherwise the running process can continue using the old address.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common 503 and startup failures

Varnish returns 503 for every request

A 503 generally means Varnish cannot connect to the configured backend. Check the exact .host and .port in /etc/varnish/default.vcl, then test Apache directly at that address:

curl -i -H 'Host: example.test' http://127.0.0.1:8080/

If the direct request fails, correct Apache’s listener, virtual-host configuration, service state, or application. If it succeeds, compare the address used by Varnish with the address tested manually. A VCL pointing at localhost, for example, may not behave as expected if name resolution selects an address where Apache is not listening; use the actual reachable address when diagnosing.

Varnish cannot bind port 80

Inspect every Apache Listen directive and every enabled virtual host. Changing only the first site is not enough. Also check for another process using port 80 with:

sudo ss -ltnp

Free the port or deliberately choose a different listener, then update the surrounding proxy and firewall configuration to match.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Unit edits appear to be ignored

If a changed listener or VCL path has no effect, run:

sudo systemctl daemon-reload
sudo systemctl restart varnish

Then inspect the service status and the effective listener. Editing a file without reloading systemd leaves the manager using its previously read unit definition.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

DNS changed but Varnish uses the old origin

Because hostname resolution occurs when VCL is compiled, a DNS update does not automatically change the backend of an already loaded VCL. Reload the VCL or restart Varnish, then test the new backend address directly from the Varnish host.

Apache works directly but the wrong site appears through Varnish

Use the same Host header in both direct and proxied tests. Check that every Apache virtual host now binds to :8080 and that the request’s host header reaches Apache as intended. A missed binding or an unexpected default virtual host can make the origin appear healthy while serving the wrong site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Varnish starts but responses are not cached

First prove connectivity and correct routing; a working reverse-proxy path is the prerequisite for caching. Then review the response’s cache-control policy, cookies, authorization requirements, and any VCL rules that deliberately pass requests. Do not infer a cache hit from a single request, and do not claim a hit rate without measuring the target deployment.

Safe change and reload procedure

Separate service-file changes from VCL changes so you know which reload is required.

  • Apache port or virtual-host edit: run the Apache configuration test, restart Apache, verify port 8080 directly, then test through Varnish.
  • VCL edit: validate it with the Varnish tooling available on the installed package, reload or restart Varnish, and repeat the direct-origin and public-listener requests.
  • systemd unit or drop-in edit: run sudo systemctl daemon-reload, restart Varnish, and inspect the resulting status and listener.
  • DNS backend change: reload the VCL because the hostname is resolved at compilation time, then verify the new address.

Keep a rollback copy of the last known-good Apache configuration, VCL, and service override. If a new configuration fails, restore the files, validate them, reload systemd when applicable, restart the affected service, and repeat the two-layer tests.

Operational checklist

  • Varnish owns the public HTTP port 80.
  • Apache owns the origin port 8080 and no longer attempts to bind port 80.
  • Every enabled Apache virtual host uses the new port.
  • The VCL backend’s host and port match Apache exactly.
  • The Varnish service loads /etc/varnish/default.vcl and includes a listener equivalent to -a :80.
  • systemctl daemon-reload was run after any unit or drop-in edit.
  • Apache responds directly on 8080 before proxied testing.
  • The site responds through Varnish on port 80 with the intended Host header.
  • Any hostname backend was reloaded after a DNS address change.
  • Multiple backends, TLS termination, firewall policy, and health checks are documented if they are part of the deployment.

What a correct minimal configuration looks like

For a same-host Debian or Ubuntu installation, the essential end state is small:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
# /etc/apache2/ports.conf
Listen 8080

# every enabled site
<VirtualHost *:8080>
    ServerName example.test
    # existing directives
</VirtualHost>

# /etc/varnish/default.vcl
vcl 4.1;
backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

# Varnish service arguments (equivalent values)
-a :80
-f /etc/varnish/default.vcl

The snippets show the relationship, not a complete replacement for your distribution’s Apache site or Varnish unit. Preserve existing application directives and package-required service arguments. Once Apache answers on 8080 and Varnish answers on 80, add only the caching and routing behavior your application requires.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.