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
To install Apache on a Google Cloud server, create or select a Linux Compute Engine virtual machine, allow inbound TCP port 80, connect with the console’s SSH button, and install Apache on the VM. On Ubuntu, the installation command is sudo apt update && sudo apt -y install apache2. Apache normally starts as soon as the package finishes installing.
Open http://EXTERNAL_IP—not HTTPS—for the first test. If the page does not load, check the VM’s external IP, network tag, and VPC firewall rule before changing Apache itself. A reserved static IP is optional, but it is the practical choice for DNS and any client that must continue using the same address. Before exposing a real site, add HTTPS with a domain, a certificate, and TLS termination on the VM or an HTTPS load balancer.
What does Apache run on in Google Cloud?
Apache runs inside a Linux Compute Engine VM. Google Cloud supplies the virtual machine, networking, and browser-based SSH entry point; Apache is the web server process installed inside the guest operating system. The cloud console and the operating system therefore have separate responsibilities:
Recommended Free Tools
- Compute Engine: creates the VM, assigns its network interface, and can provide an external IP.
- VPC networking: decides whether traffic from the internet is allowed to reach TCP port 80.
- Ubuntu: installs and runs the Apache package.
- Apache: serves files from the configured document root, which is
/var/www/html/in this example.
The procedure below is for an Ubuntu Compute Engine VM. Other Linux distributions use different package managers and service package names, so do not paste the Ubuntu command into a different distribution without adapting it.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
What do you need before installing Apache?
You need a Google Cloud project, permission to create or administer a Compute Engine VM, and a Linux VM that you can access through SSH. Decide whether the site must be public before creating the VM: a public test requires an external IP and a firewall path to the VM, while an internal-only service can remain inside the VPC.
- A Compute Engine VM running Ubuntu.
- Permission to open the VM’s SSH session from the Google Cloud console.
- An external IP if users outside the VPC must reach the site.
- Inbound TCP port 80 allowed by a VPC firewall rule when the site is public.
- A domain and certificate plan before using the service for production HTTPS.
Do not confuse an SSH connection with web access. SSH opens an administration session, normally through the console’s SSH button; it does not automatically permit browser traffic on port 80.
How do you create or select the Linux Compute Engine VM?
Create a new Linux VM or use an existing Ubuntu VM. During creation, enable the HTTP option if the VM must serve a public HTTP page.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →- Open Compute Engine > VM instances in the Google Cloud console.
- Create a VM, or select an existing Ubuntu instance.
- In the network settings, select Allow HTTP traffic when the service needs to be reachable on TCP port 80. Google Cloud documents this option as opening
tcp:80. - Finish creating the VM and wait until it is running.
- In the VM Instances list, click SSH for that instance. A browser terminal opens inside the VM.
If you skipped Allow HTTP traffic, you can add a matching firewall rule later. The VM can still be running Apache correctly while every external request is blocked by the VPC.
How do you open port 80 for Apache?
Google Cloud must permit inbound TCP port 80, and the rule must apply to the selected VM. The simplest creation-time path is Allow HTTP traffic; the manual path uses a VPC firewall rule and the VM’s network tag.
Use the VM creation option
Selecting Allow HTTP traffic creates or associates the HTTP access needed for a basic public web server. Confirm that the option is enabled on the intended VM, especially when several instances have similar names.
Use a matching firewall rule
A manual rule needs all of the following to line up:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitches- Direction: ingress (incoming).
- Protocol and port: TCP port 80.
- Target: the VM, usually selected by its network tag.
- Source range: the client networks that should be allowed.
Google Cloud’s troubleshooting example uses a rule named default-allow-http with 0.0.0.0/0, which means every IPv4 source. That is useful for a deliberately public test, but it is broader than necessary when you know the office, partner, VPN, or customer ranges that should connect. Restrict the source ranges whenever the audience is known.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Check the network tag
A firewall rule can exist and still have no effect if its target tag is not attached to the VM. Compare the rule’s target tags with the tags shown in the VM network interface settings. A mismatch is one of the fastest explanations for a browser timeout after installation.
How do you install Apache on Ubuntu?
After clicking SSH and reaching the Ubuntu terminal, update the package index and install Apache in one command:
sudo apt update && sudo apt -y install apache2
The first part refreshes Ubuntu’s available package information. The second installs the apache2 package and accepts the package manager’s confirmation prompt automatically. Google Cloud’s documented behavior is that “After installing Apache, the operating system automatically starts the Apache server.”
Free tools Windows power users keep installed
One-click scans. No signup required.
Installation does not by itself make the site reachable from the internet. Apache can be active locally while a missing external IP or VPC firewall rule blocks every outside request.
How do you verify that Apache is running?
Check the service from the same SSH terminal:
sudo systemctl status apache2
Look for an active, running service in the status output. If the service is not active, read the error shown by systemctl before trying to diagnose Google Cloud networking; a cloud firewall cannot start a failed process.
You can also make the result obvious by replacing the default page with a small test document. The documented Ubuntu document root for this example is /var/www/html/:
echo '<!doctype html><html><body><h1>Hello World!</h1></body></html>' | sudo tee /var/www/html/index.html
The command writes a new index.html. If Apache is running and the request reaches the VM on port 80, the browser will display “Hello World!” rather than the distribution’s original welcome page.
How do you test the Apache site from the internet?
In Compute Engine > VM instances, copy the value in the VM’s External IP column. Enter this address in a browser with the HTTP scheme:
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
http://EXTERNAL_IP
Replace EXTERNAL_IP with the numeric address assigned to your VM. Use http for this first test. Google Cloud warns that requesting https://EXTERNAL_IP before HTTPS is configured results in a Connection Refused response; an IP-only test does not provide the certificate and TLS setup that HTTPS expects.
Test from a network outside the VM’s administration session when possible. A successful page proves that Apache is running, the VM has a usable external address, and the VPC path permits TCP port 80.
Why can you not reach the Apache site by external IP?
Connection failures usually come from one of four layers: Apache, the VM’s external address, the firewall rule, or the URL scheme. Check them in that order so that a network change does not hide a service problem.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Apache is not active
Run:
sudo systemctl status apache2
If the service is stopped or reports an error, fix the operating-system or Apache problem shown in the status output first. Rechecking the browser before the local service is healthy cannot produce a useful network diagnosis.
The VM has no external IP
Outside-VPC communication requires an external IP and is still subject to firewall rules. If the VM’s External IP column is empty, an internet browser has no public destination for the request. Assign an external address or use an internal access path appropriate for a private service.
The HTTP firewall rule does not apply
Confirm that a VPC ingress rule allows TCP port 80, that its target includes this VM, and that the VM carries the required network tag. A rule aimed at another tag or another network will not open this instance.
The source range is too narrow
A rule restricted to a corporate, VPN, or test range will reject requests from other networks. For a public test, Google Cloud’s example uses 0.0.0.0/0 for all IPv4 sources. Use that broad range only when the page is intentionally public; otherwise add the actual client ranges and test from one of them.
You used HTTPS too early
Try http://EXTERNAL_IP first. Until a certificate and TLS listener are configured, https://EXTERNAL_IP is not a valid test and can produce Connection Refused even when ordinary HTTP is working.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
You are checking the wrong address
External addresses can change when a VM is stopped, recreated, or otherwise goes through a lifecycle change. Copy the current value from the VM Instances page instead of relying on an old bookmark or an address remembered from an earlier session.
Separate timeout from refusal
A timeout commonly points to the packet being filtered or sent to an unreachable address, while an immediate refusal can indicate that no service is listening on the requested port or that HTTPS was attempted without TLS configuration. These symptoms are clues, not substitutes for checking service status, external IP, and the firewall rule.
Should you reserve a static external IP?
Compute Engine can give a VM an ephemeral external IP or a reserved static external IP. An ephemeral address is adequate for a disposable test; reserve and assign a static address when DNS, an integration, or another client must continue pointing to the same address after VM lifecycle changes.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall| Address choice | Best fit | Operational implication |
|---|---|---|
| Ephemeral external IP | Short-lived testing or a page reached manually from the console | The address may change after relevant VM lifecycle events, so bookmarks and DNS records should not depend on it. |
| Reserved static external IP | A named site, DNS record, API client, or allowlist that needs a stable destination | The address remains reserved and can be assigned deliberately to the service as its infrastructure changes. |
A static address does not replace a firewall rule and does not encrypt traffic. It solves address stability only; Apache still needs to listen, TCP port 80 or 443 still needs an allowed path, and production traffic still needs HTTPS.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How do you prepare Apache for production HTTPS?
Use HTTP only as the initial reachability test. Public services should encrypt communication before production use. Google Cloud’s secure-connection guidance identifies three pieces: a domain, a certificate from a certificate authority, and TLS termination either on the VM or on an HTTPS load balancer.
Choose where TLS terminates
| Arrangement | What it means | When it fits |
|---|---|---|
| TLS on the VM | Apache (or another web-server component on the instance) handles the certificate and encrypted connection. | A straightforward single-VM deployment where you want the VM to own the web-server configuration. |
| TLS on an HTTPS load balancer | The load balancer accepts HTTPS and forwards traffic to the VM service according to its backend configuration. | A design that separates the public TLS entry point from the VM and can later accommodate a broader managed architecture. |
Neither arrangement is enabled by installing the Ubuntu package alone. Plan the hostname, certificate issuance, renewal, and listener configuration before directing production users to the service.
Use a domain rather than an IP-only production URL
A domain gives the certificate a stable name and lets you move the service without asking every user to learn a new numeric address. Point the domain at the service’s stable public endpoint, preferably a reserved static IP when the VM is the direct destination. The certificate and DNS plan must agree on the hostname users will enter.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Keep the HTTP test separate from the HTTPS rollout
First prove that http://EXTERNAL_IP returns the test page. Then configure the chosen TLS termination point and test the domain over HTTPS. Treat a failed HTTPS test as a certificate, listener, DNS, or load-balancer problem only after the underlying HTTP path is known to work.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Which deployment choices should you make for a Google Cloud Apache server?
The right choice depends on audience, address stability, and how much infrastructure you want around one VM. The available evidence establishes the networking and TLS trade-offs, but it does not establish performance benchmarks for these alternatives.
| Decision | Simpler option | More controlled or scalable option |
|---|---|---|
| Address | Ephemeral external IP for a temporary test | Reserved static external IP for DNS and persistent clients |
| Firewall source | Broad public IPv4 range for an intentionally public test | Restricted source ranges for a known audience |
| TLS | Terminate TLS directly on the VM | Terminate TLS at an HTTPS load balancer |
| Architecture | One Compute Engine VM running Apache | A managed or load-balanced design when availability and growth requirements exceed a single instance |
Start with the smallest arrangement that meets the requirement, but make the address and firewall decisions deliberately. A public page with an ephemeral address and a wide-open test rule is different from a named production service, even though both may display the same Apache index file.
What is the complete installation checklist?
Use this sequence when you want a repeatable first deployment:
- Select or create an Ubuntu Compute Engine VM.
- Enable Allow HTTP traffic, or plan a VPC rule that permits inbound TCP port 80 to the VM’s network tag.
- Confirm the VM is running and has an external IP if the audience is outside the VPC.
- Click SSH in the VM Instances page.
- Run
sudo apt update && sudo apt -y install apache2. - Run
sudo systemctl status apache2and confirm that Apache is active. - Optionally write the test page to
/var/www/html/index.html. - Open
http://EXTERNAL_IPfrom an external browser. - If it fails, check the service, external IP, firewall rule, source range, and network tag in that order.
- Reserve a static IP when DNS or another client requires a stable address.
- Before production, configure a domain, a certificate authority-issued certificate, and TLS termination on the VM or an HTTPS load balancer.
What should you change after the Hello World test?
The test page proves the delivery path, not the readiness of an application. Replace it with the site’s actual files under the appropriate Apache document root and review file ownership, application configuration, and access controls before publishing content. Keep the HTTP page available only as long as it helps diagnose connectivity.
Revisit the firewall source ranges when the audience changes. A rule that was acceptable for a temporary public demonstration may be unnecessarily permissive for an internal dashboard, partner endpoint, or administrative site. Likewise, move from an ephemeral to a reserved static IP before creating DNS records that must survive VM lifecycle changes.
Finally, complete the HTTPS design rather than treating a reachable HTTP page as the finished deployment. Encryption, a valid hostname, certificate management, and a deliberate TLS termination point are separate tasks from installing Apache.
Frequently Asked Questions
Can I run Apache on a Google Cloud VM without making it public?
Yes. Keep the VM on an internal address and allow only the VPC, VPN, or other approved source ranges in the ingress rule. Users on the public internet will not be able to reach it without an external IP and a corresponding firewall path.
What happens to a domain if an ephemeral IP changes?
The DNS record can continue pointing at the old address while the VM uses a new one, making the site appear offline. Reserve a static external IP before publishing a hostname that must survive stop, recreate, or other lifecycle changes.
Does installing Apache configure HTTPS automatically?
No. The Ubuntu package installation starts the Apache service and supports an HTTP test, but HTTPS still needs a domain, a certificate from a certificate authority, and TLS termination configured on the VM or an HTTPS load balancer.
Why does a firewall rule with port 80 still fail to reach my VM?
The rule may target a network tag that the VM does not have, use source ranges that exclude your current network, or belong to a different VPC network. Check the rule target, source range, network, and the VM’s external IP together.
Quick Recap
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.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

