The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Put a site’s public files in the directory named by the active Nginx root directive. On a standard Ubuntu installation that directory is usually /var/www/html, but a custom site can use a path such as /srv/my-site/html and a multi-domain server should normally give every domain its own root. Nginx then appends each request URI to that directory when looking for a file.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What Nginx means by a website “root”
In a LEMP stack, Linux stores the files, Nginx receives HTTP requests, and (when required) PHP-FPM executes PHP scripts. The directory exposed by Nginx is not chosen by the Linux distribution alone. It is selected by the root directive in the server block that handles a request.
As an Amazon Associate I earn from qualifying purchases.
For example, if a server block contains:
root /srv/my-site/html;
Nginx resolves a browser request for /images/logo.png as:
/srv/my-site/html/images/logo.png
This URI-to-filesystem rule is documented in NGINX’s reference material and beginner’s guide. A request for / is handled by the server block’s index settings, while a request for a missing file can be rejected by a try_files rule. The directory name itself does not make a file executable, secure, or PHP-enabled; those behaviors come from the rest of the configuration.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Choose a layout that matches your server
| Situation | Typical public directory | How it is selected | Important consideration |
|---|---|---|---|
| One site on a default Ubuntu install | /var/www/html |
Ubuntu’s enabled default server block | Fastest path for a simple static site; replace or edit the default content deliberately. |
| One custom site | /srv/my-site/html or another dedicated path |
A custom server block with its own root |
Keeps the site independent of the distribution’s example files and makes deployments easier to organize. |
| Several domains | For example, /var/www/example.com/html for each domain |
One matching server-block file per domain, enabled under /etc/nginx/sites-enabled/ |
Separate roots prevent one site’s files from being accidentally served for another domain. |
| Static site | Any of the paths above | root, index, and usually try_files |
Only files intended for download or display need to be present. |
| PHP application | Any of the paths above | The same root, plus a PHP location forwarding to PHP-FPM |
Putting a .php file under the root does not execute it by itself. |
/var/www/html is an Ubuntu convention, not a universal LEMP requirement. Ubuntu’s own guidance notes that even a single-site installation may place its files elsewhere. A /srv path is equally valid when the active configuration points to it and the Nginx worker can read it.
Set up a single custom site
The following sequence creates a site at /srv/my-site/html. Substitute your own domain and path where appropriate. Run administrative commands with an account that has sudo access.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Create the public directory.
sudo mkdir -p /srv/my-site/html - Add only public assets. Place the site’s entry page, stylesheets, JavaScript, images, fonts, and application entry points below this directory. Keep database dumps, private keys, deployment configuration, backups, and environment files outside it.
- Create a test index page.
sudo sh -c 'printf "%sn" "<h1>My site</h1>" > /srv/my-site/html/index.html' - Set directory permissions. Ubuntu’s example uses mode 755 for a custom tree, which allows traversal and reading while preventing ordinary users from writing through the directory unless ownership or group permissions grant it.
sudo chmod -R 755 /srv/my-siteUse a more narrowly managed owner and group for a real deployment if an application must write to selected directories.
- Create a server-block file. A typical static configuration is:
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /srv/my-site/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
- Save and enable the site. On Ubuntu and Debian, save the block as
/etc/nginx/sites-available/example.com, then create the enabled-site symlink:
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com
- Check the complete configuration before applying it.
sudo nginx -tA successful test reports that the syntax is okay and the configuration test is successful. Correct any reported filename, brace, permission, or duplicate-listen errors before continuing.
- Reload Nginx without dropping existing connections.
sudo systemctl reload nginx
Once DNS points the domain at the server, request the site and confirm that the expected index file is returned. If the default Ubuntu page still appears, the request is probably matching another server block, the hostname is not reaching this machine, or the new file was not enabled.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Organize multiple domains safely
For more than one domain, use a separate public tree and server-block file for each site. A clear arrangement might look like this:
/var/www/
├── example.com/
│ └── html/
│ ├── index.html
│ └── images/
└── example.net/
└── html/
└── index.html
Create each tree, put its public assets in the matching html directory, and give each domain a server block whose server_name and root agree. For example, the block for example.net should contain server_name example.net; and root /var/www/example.net/html;. Store the file in /etc/nginx/sites-available/ and enable it with a symlink in /etc/nginx/sites-enabled/.
After enabling or changing several sites, run sudo nginx -t once and then sudo systemctl reload nginx. Separate roots provide isolation at the web-serving layer: a mistake in one site’s deployment is less likely to expose another site’s files, and each domain can later receive different rewrite, TLS, caching, or PHP settings.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Set permissions for reading, not unrestricted writing
Nginx workers must be able to traverse every parent directory and read the files they serve. A file can have apparently correct mode bits and still produce a 403 response if one parent directory denies traversal. Check the complete path, not only the final file.
- Give the Nginx worker read access to public files and execute (traverse) access to their parent directories.
- Keep secrets, SSH keys, database credentials, backups, and deployment metadata outside the document root.
- Do not make the entire web root writable by the Nginx account merely because one upload or cache directory needs writes.
- Create narrowly scoped writable directories for uploads, generated thumbnails, sessions, or caches, and apply ownership and permissions only there.
- Review permissions after deployments; archive files and temporary copies can become downloadable if they are left under the public path.
Ubuntu’s illustrative custom-site setup applies mode 755 to the tree. That is a starting point for a simple read-only site, not a requirement to use the same ownership model for every application. Your deployment user, Nginx worker user, and application process may be different, so choose group membership and write permissions intentionally.
Static files and PHP files are handled differently
A static site needs a document root, an index file, and request handling such as try_files $uri $uri/ =404. That directive checks whether the requested path is a file or directory and returns a 404 response when neither exists.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
PHP requires an additional handoff. A PHP-enabled LEMP server normally includes a location matching .php requests and passes them to the installed PHP-FPM service through its Unix socket or listening address. The socket filename depends on the distribution and installed PHP version, so use the socket that exists on your server rather than copying a version-specific name blindly. A simplified pattern is:
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
The exact include file and socket path vary between Ubuntu or Debian releases and PHP packages. Verify them locally, test with nginx -t, and reload after changes. Keep the public root limited to files that should be reachable over HTTP; application source, configuration containing credentials, and private libraries should not be exposed simply because PHP can execute them.
Why Nginx returns 404 when the file exists
A 404 means the request did not resolve to the file Nginx expected in the active server context. Work through these checks in order:
Best Value
- Confirm the active root. Inspect the server block selected for the requested hostname and verify its
rootpath. A file in/var/www/htmlwill not be found when the matching block points to/srv/my-site/html. - Translate the URI yourself. For a request such as
/css/site.css, append that URI to the configured root and check whether the exact case-sensitive path exists. - Check the hostname. Ensure the browser’s Host header matches
server_name. Testing by IP address can select the default server instead of the domain’s block. - Inspect the index setting. A request for
/needs an existing file named in theindexdirective, such asindex.htmlorindex.php. - Review
try_filesand rewrites. An incorrect fallback can send valid application routes to 404. For a purely static site,try_files $uri $uri/ =404is an explicit and predictable choice. - Test and reload the configuration. Nginx continues using the previous valid configuration until a reload succeeds. Run
sudo nginx -tand thensudo systemctl reload nginx. - Check permissions and logs. A permission problem often appears as 403 rather than 404, but logs reveal which path Nginx attempted and whether another rule handled the request.
Deployment patterns that avoid accidental exposure
For a small static site, deploying directly into the configured root is workable: upload the new HTML, CSS, JavaScript, and image files, then verify the result. For an application with frequent releases, keep versioned releases outside the public path and expose only the selected release through a controlled directory or symlink. This makes rollback possible without changing the server block every time.
Regardless of the deployment method, ensure the final path that Nginx follows remains readable and traversable. If an application needs to write user uploads, put those uploads in a dedicated directory and decide whether they should be served directly, validated before serving, or stored outside the web root and delivered through an application endpoint.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Do not place a backup such as site.tar.gz, an editor swap file, a copied .env, or an unprocessed database export below the root. Nginx serves files according to path and configuration; it does not know that a file was intended only for administrators.
Verify the final result
- Open the domain over HTTP and confirm the expected index page, not the distribution’s welcome page.
- Request a known asset such as
/images/logo.pngand verify that it maps to the corresponding file below the configured root. - Request a deliberately missing path and confirm that the intended 404 behavior occurs.
- If PHP is configured, use a temporary, non-sensitive test script to confirm that PHP-FPM handles it, then remove the script.
- After DNS, TLS, or server-block changes, test each hostname separately because different names can select different blocks.
The durable rule is simple: files belong wherever the active server block says they belong. Use Ubuntu’s /var/www/html for the uncomplicated default case, choose a dedicated /srv or per-domain path when organization and isolation matter, and add PHP-FPM routing only when the application actually needs PHP execution.
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.

