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

To run Ghost at https://example.com/blog/, keep Ghost listening on its local port (normally 2368), set Ghost’s public URL to include /blog/, and configure nginx to reverse-proxy that path to Ghost. Forward the original host, HTTPS scheme, and client IP, then test both slash and non-slash URLs. The most common failures—404 responses, redirect loops, and links exposing 127.0.0.1:2368—come from a mismatch among those three settings.

How the arrangement works

A subdirectory installation has three separate layers:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Ghost: the application runs privately on the server, listening on port 2368 unless you deliberately choose another local port.
  • nginx: the public reverse proxy receives requests for example.com/blog/ and forwards them to Ghost.
  • Ghost’s public URL: Ghost must be told that visitors use https://example.com/blog/, not the internal address or the domain root.

The browser never needs to reach port 2368 directly. nginx terminates HTTPS, preserves the subdirectory in the request, and supplies forwarding headers so Ghost can build correct absolute URLs and redirects.

Before you start

Confirm the prerequisites

  • A server where you can install and run Ghost and edit nginx’s virtual-host configuration.
  • An existing domain, such as example.com, whose DNS points to that server.
  • An unused path reserved for the publication, such as /blog/. Decide the path before installation; changing it later requires coordinated changes in Ghost and nginx.
  • HTTPS for the public domain. The production proxy should redirect HTTP to HTTPS.
  • Permission to reload nginx and inspect its error log when a request fails.

Choose the exact public URL

Use one canonical URL, including the subdirectory and a trailing slash, for example https://example.com/blog/. Do not configure Ghost with http://localhost:2368, http://127.0.0.1:2368, or the bare domain if readers will use the subdirectory. A mismatch produces internal addresses in links, bad redirects, or assets requested from the wrong path.

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

Understand the documentation boundary

As of October 14, 2026, the readily available Ghost subdirectory instructions describe Ghost(Pro) hosting, while a verified, current self-hosted subpath procedure was not available in the material used for this guide. The reverse-proxy pattern below is community-reported and should be checked against the Ghost CLI and self-hosted Ghost documentation for the version you install before you apply it to production. The architecture and required settings are clear; exact installer flags and generated-file names can change.

Step 1: Install Ghost on a local listener

Install Ghost on the server using the supported Ghost CLI process for your operating system. During setup, keep the application bound to the server’s local interface and port 2368, the default reported in community guides. The public web server will be nginx, so Ghost does not need to listen on a public network interface.

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

After installation, verify from the server itself that the Ghost process is running and that the local listener responds. Do not expose port 2368 through the firewall merely to make the site reachable; nginx should be the internet-facing service.

If the installer asks for a site URL, enter the complete subdirectory URL rather than the domain root. If it creates nginx files automatically, stop and review the existing virtual-host configuration first. A community-reported installation pattern creates new nginx files and symlinks them into sites-enabled; blindly accepting those files can create duplicate server blocks or overwrite assumptions in an established site.

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

Step 2: Set Ghost’s public URL to the subdirectory

Set the production URL in Ghost’s configuration to:

https://example.com/blog/

Use your real domain and path. The setting is commonly changed through the Ghost CLI’s URL configuration command or directly in the Ghost configuration file, depending on the installed version. Because command names and install flags can change, confirm the exact syntax in the current Ghost CLI documentation before running it. The important result is that Ghost’s production url value contains the scheme, hostname, and /blog/ path.

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

Restart Ghost after changing the configuration so the running process uses the new value. Then check generated links from a local request or the Ghost logs. If you see 127.0.0.1:2368, localhost:2368, or links that omit /blog, stop and correct the public URL before debugging nginx.

Step 3: Add an nginx location for the subdirectory

Create or edit the HTTPS server block for your domain. The following is a working-shaped template for the arrangement described above; adapt certificate directives, the server name, and file locations to your host.

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.
server {
    listen 443 ssl;
    server_name example.com;

    # Your existing TLS certificate directives go here.

    location = /blog {
        return 301 /blog/;
    }

    location /blog/ {
        proxy_pass http://127.0.0.1:2368;

        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Why each directive matters

  • location = /blog gives the path without a slash one canonical redirect to /blog/.
  • location /blog/ handles the blog and all of its descendants, including posts, assets, and administrative requests that Ghost generates beneath the configured URL.
  • proxy_pass http://127.0.0.1:2368; sends the request to Ghost’s local listener. Keeping the directive without a replacement path preserves the requested /blog/... URI for an application configured with that same public prefix.
  • Host and X-Forwarded-Host identify the public hostname. Without them, Ghost can construct links for the proxy’s internal address instead.
  • X-Forwarded-Proto https tells Ghost that the visitor used HTTPS even though the upstream hop from nginx to Ghost is plain HTTP. Missing or incorrect scheme information is a reported cause of redirect loops.
  • X-Forwarded-For carries the visitor’s address through the proxy chain for logging and application-level decisions.

Do not add a second, conflicting /blog location in another server block. nginx chooses among all matching locations, and an older rule can make a correct-looking block appear ineffective.

Step 4: Redirect HTTP to HTTPS

Use a separate HTTP server block to send every request to the HTTPS version while retaining the original path:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
server {
    listen 80;
    server_name example.com;

    return 301 https://$host$request_uri;
}

With this arrangement, the request reaches the Ghost location only after it is encrypted. In the TLS server block, keep X-Forwarded-Proto set to https. If you use a shared configuration for both schemes instead, ensure that the value accurately reflects the visitor-facing scheme at each hop; passing http for an HTTPS page can make Ghost redirect repeatedly.

Step 5: Validate the configuration and reload nginx

  1. Save the edited server configuration and check its syntax with nginx -t. Fix every reported error before reloading.
  2. Reload nginx using the service-management command appropriate to your distribution, commonly systemctl reload nginx. A reload applies the new configuration without needlessly stopping active connections.
  3. Request both https://example.com/blog and https://example.com/blog/. The first should redirect once to the second; the second should return the Ghost site.
  4. Open a post and follow its navigation, images, stylesheets, and canonical links. Every URL should retain /blog and the HTTPS scheme.
  5. Check the Ghost administrative URL generated by your installed version and confirm that sign-in, publishing, and asset uploads remain under the same subdirectory.
  6. If anything fails, watch nginx’s error log and Ghost’s application log while making one request. The first failing hop—nginx matching, upstream connection, or Ghost-generated redirect—usually identifies the layer that needs correction.

Diagnose the common failures

A 404 appears at /blog or /blog/

A 404 under a subfolder is a reported Ghost/nginx problem, including in community thread 17656, but the retrieved material does not establish one universal fix. Check the configuration systematically:

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.
  • Confirm that the request is reaching the intended HTTPS server block and not another virtual host for the same domain.
  • Confirm that the prefix is exactly the same everywhere: /blog/ in Ghost’s public URL, location /blog/ in nginx, and the URL you are testing.
  • Check whether an older location rule, a web-application root rule, or an automatically generated file is taking precedence.
  • Verify that Ghost is actually listening on 127.0.0.1:2368 (or the local address and port you selected) and that nginx can connect to it.
  • Run nginx -t, reload nginx, and retry with a fresh browser request so a cached redirect does not obscure the result.

If the upstream request reaches Ghost but Ghost itself returns the 404, inspect the configured public URL and the exact URI nginx sends. Do not assume that changing a trailing slash or stripping the prefix is safe; the correct behavior depends on the Ghost version and its current subpath handling.

The browser is stuck in a redirect loop

Check the forwarded scheme and host first. The HTTPS server must pass X-Forwarded-Proto: https, along with the public Host and X-Forwarded-Host. A proxy that tells Ghost the original request was HTTP can cause Ghost to redirect to HTTPS, while nginx sends the next upstream request with the same misleading value. Also verify that Ghost’s public URL itself starts with https:// and contains /blog/.

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.

Links point to 127.0.0.1:2368 or omit the folder

This indicates a public-URL mismatch rather than a DNS problem. Set Ghost’s production URL to the complete public address, restart Ghost, and clear any cached page or browser redirect before testing again. The forwarding host headers should agree with that value.

nginx appears to ignore your changes

Run nginx -t against the configuration nginx actually loads, then reload the service. Inspect the enabled-site symlinks and included files. Ghost’s installer may have created a new file and linked it into sites-enabled; an edit to a different file will have no effect. Also look for duplicate server_name entries and confirm which block handles the request.

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.

The root website breaks after adding the blog

Keep the blog location narrowly scoped to /blog/. Do not replace the root site’s existing location / unless you intend to move that site. The exact-match redirect for /blog and the longer prefix for /blog/ should leave unrelated paths to the root application.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Subdirectory or subdomain?

A subdirectory (example.com/blog/) and a subdomain (blog.example.com) are different routing choices. The table separates what is established operationally from what remains unverified in the available material.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Question Subdirectory Subdomain
Public address https://example.com/blog/ https://blog.example.com/
Proxy routing Requires a path-specific nginx location and a Ghost URL containing /blog/. Typically uses a separate hostname/server block; the path does not need a blog prefix.
DNS Uses the existing domain’s DNS record. Requires the subdomain to resolve to the Ghost proxy.
Configuration effort More sensitive to URI prefixes, slash handling, and conflicts with the root site. Usually simpler path handling, but it introduces a second hostname and TLS/DNS configuration.
SEO conclusion Not established by the evidence available for this guide. Not established by the evidence available for this guide.

Choose the subdirectory when the blog should live visibly inside the main site’s URL structure and you are comfortable maintaining a path-aware proxy. Choose a subdomain when isolation and simpler application routing matter more than keeping one hostname. No ranking advantage should be inferred from this guide alone.

Self-hosted nginx versus hosted subdirectory service

Consideration Self-hosted Ghost behind nginx Ghost(Pro) subdirectory hosting
Server control You control the operating system, nginx, network exposure, and Ghost process. The hosting provider manages the application infrastructure.
Configuration work You must set the public URL, proxy location, forwarding headers, TLS redirect, and reload process. The provider’s subdirectory workflow handles more of the hosting configuration.
Maintenance You are responsible for updates, logs, backups, certificate operations, and recovery. Infrastructure maintenance is delegated to the hosted service, subject to its plan and controls.
Evidence used here The nginx pattern is community-reported; verify exact self-hosted commands for your Ghost release. Ghost’s own subdirectory help material is written for its hosted service.

The hosted option reduces server configuration, while self-hosting provides direct control over the proxy and process. This comparison does not establish pricing or feature parity; consult the current service terms for those details.

Operational checks after launch

  • Keep port 2368 private. Expose HTTPS through nginx and allow the Ghost process to accept traffic only from the local proxy where your network policy permits.
  • Monitor both layers. nginx access and error logs show proxy behavior; Ghost logs show application responses and generated redirects.
  • Re-test after upgrades. A Ghost or CLI update can change generated configuration files or subpath behavior. Repeat the slash, HTTPS, asset, navigation, and administrative checks after each upgrade.
  • Protect configuration backups. Preserve the working Ghost URL setting and nginx server block so a failed change can be rolled back quickly. Never publish secrets from the Ghost configuration file.
  • Keep one canonical path. Decide whether the site uses /blog/ and redirect only the variant without the trailing slash. Avoid simultaneously exposing the same publication at the domain root, a second folder, and a subdomain.

Deployment checklist

  1. DNS for example.com resolves to the nginx server.
  2. Ghost is installed and listening locally on port 2368 (or your documented alternative).
  3. Ghost’s production URL is https://example.com/blog/, including the path.
  4. The HTTPS nginx server has an exact redirect for /blog and a proxy location for /blog/.
  5. The proxy passes Host, X-Forwarded-Host, X-Forwarded-Proto: https, and X-Forwarded-For.
  6. HTTP redirects to HTTPS while retaining the requested URI.
  7. nginx -t succeeds and nginx has been reloaded.
  8. Both slash variants, posts, assets, canonical links, and the administrative interface work without leaving /blog or HTTPS.
  9. Logs show no repeated redirects, upstream connection failures, or unexpected virtual-host matches.

Bottom line

A reliable Ghost subdirectory deployment is a coordinated three-way configuration: Ghost runs privately on port 2368, Ghost’s public URL includes the full /blog/ prefix, and nginx proxies that prefix while forwarding the public host, HTTPS scheme, and client address. Treat the nginx block above as a version-aware template, verify the exact Ghost CLI syntax for your release, and investigate 404s through the active server block and logs rather than guessing at URI rewrites.

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.

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