Skip to content
Menu
DevSecOps Now!!!
  • About
  • Certifications
  • Contact
  • Courses
  • DevSecOps Consulting
  • DevSecOps Tools
  • Training
  • Tutorials
DevSecOps Now!!!

Complete Tutorial: Setting Up Laravel Telescope Correctly (Windows + XAMPP + Custom Domain)

Posted on December 13, 2025

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

This tutorial explains why Telescope was not working, what went wrong, and how to fix it permanently, including all real-world issues you faced like 404 errors, empty .htaccess, Apache misconfiguration, subdomains, and performance tracking.


1. What Laravel Telescope Is (and What It Is Not)

Laravel Telescope is not just a debugging tool.
It is a request, query, and performance inspection system that records:

  • HTTP requests & responses
  • Database queries (including slow queries)
  • Exceptions and errors
  • Logs
  • Jobs, queues, cache, events
  • API calls

Important understanding:

  • Telescope depends fully on Laravel routing
  • If Apache does not forward requests to index.php, Telescope will never load
  • A 404 from Apache means Laravel was never reached

This exact thing happened in your case.


2. Why You Were Getting 404 on /telescope

Your screenshot clearly showed:

  • Apache error page (not Laravel error page)
  • URL: http://doc-core-ma/telescope
  • Message: The requested URL was not found on this server

This proves:

  • Apache was handling the request
  • Laravel routes were never executed
  • Telescope routes were never registered

Root causes identified:

  1. public/.htaccess file was empty
  2. Apache rewrite module was not effectively forwarding requests
  3. VirtualHost was either missing or incorrectly pointing

3. Correct Laravel Folder Structure (Non-Negotiable)

Your project must look like this:

doc-core-ma/
โ”œโ”€โ”€ app/
โ”œโ”€โ”€ bootstrap/
โ”œโ”€โ”€ config/
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ index.php
โ”‚   โ”œโ”€โ”€ .htaccess   โ† REQUIRED
โ”œโ”€โ”€ routes/
โ”œโ”€โ”€ storage/
โ”œโ”€โ”€ vendor/

Important rule:

  • Apache must point to public/
  • Never point Apache to project root

4. Installing Telescope (Correct and Safe Way)

From your Laravel project root:

composer require laravel/telescope --dev
php artisan telescope:install
php artisan migrate

This does three things:

  1. Registers Telescope service provider
  2. Publishes configuration
  3. Creates database tables (telescope_entries)

After this, Telescope exists, but it still wonโ€™t work unless Apache is correct.


5. The .htaccess File (Your Main Missing Piece)

You confirmed that .htaccess was empty.
This alone guarantees 404 for all Laravel routes.

Correct .htaccess content

Location:

C:\xampp\htdocs\doc-core-ma\public\.htaccess

Content (paste exactly):

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ index.php [L]
</IfModule>

What this does in plain language:

  • Enables URL rewriting
  • Sends every request (/telescope, /login, /api/*) to Laravel
  • Allows Laravel router to decide what to do

Without this, Laravel is blind.


6. Apache Configuration (Most Important Section)

6.1 Enable Rewrite Module

Open:

C:\xampp\apache\conf\httpd.conf

Ensure this line exists and is NOT commented:

LoadModule rewrite_module modules/mod_rewrite.so

If commented, remove #.


6.2 Allow .htaccess Overrides

In the same file, find:

<Directory "C:/xampp/htdocs">
    AllowOverride None

Change it to:

<Directory "C:/xampp/htdocs">
    AllowOverride All
    Require all granted
</Directory>

This allows .htaccess to work.


7. VirtualHost Configuration (doc-core-ma)

Open:

C:\xampp\apache\conf\extra\httpd-vhosts.conf

Add or fix this block:

<VirtualHost *:80>
    ServerName doc-core-ma
    DocumentRoot "C:/xampp/htdocs/doc-core-ma/public"

    <Directory "C:/xampp/htdocs/doc-core-ma/public">
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog "logs/doc-core-ma-error.log"
    CustomLog "logs/doc-core-ma-access.log" common
</VirtualHost>

Critical points:

  • DocumentRoot ends with /public
  • AllowOverride All is mandatory
  • No Laravel routes will work without this

8. Restart Apache (Mandatory)

Changes do nothing until Apache restarts.

From XAMPP:

  • Stop Apache
  • Start Apache

9. Laravel Cache Cleanup (Mandatory)

Run:

php artisan optimize:clear

This clears:

  • Config cache
  • Route cache
  • View cache

Always do this after config or env changes.


10. Confirm Telescope Is Enabled

Run:

php artisan telescope:status

If disabled:

php artisan telescope:enable

11. Verify Telescope Routes Exist

Run:

php artisan route:list

You must see routes like:

GET|HEAD  telescope
GET|HEAD  telescope/requests
GET|HEAD  telescope/queries

If these exist, Laravel side is correct.


12. Accessing Telescope

Now open in browser:

http://doc-core-ma/telescope

You should see:

  • Requests
  • Queries
  • Exceptions
  • Logs
  • Jobs
  • Cache

If this loads, your setup is 100% correct.


13. Telescope for Performance Monitoring (Important Settings)

Open:

config/telescope.php

Ensure these watchers are enabled:

'watchers' => [
    Laravel\Telescope\Watchers\RequestWatcher::class => true,

    Laravel\Telescope\Watchers\QueryWatcher::class => [
        'enabled' => true,
        'slow' => 100,
    ],

    Laravel\Telescope\Watchers\ExceptionWatcher::class => true,
    Laravel\Telescope\Watchers\LogWatcher::class => true,
],

This allows you to:

  • Detect slow queries
  • Measure request time
  • Track performance regressions

14. Avoiding Common Errors You Faced

Error: Target class [auth.admin] does not exist

Cause:

  • Telescope routes loading custom middleware

Fix:
In config/telescope.php, middleware should be:

'middleware' => ['web'],

Never add custom guards here.


Error: Telescope works on /telescope but not /hospitals/telescope

Explanation:

  • Telescope does not auto-detect subfolders
  • You must explicitly configure path

In .env:

TELESCOPE_PATH=hospitals/telescope

Then:

php artisan optimize:clear

15. Security Best Practice (Very Important)

Never expose Telescope in production.

In production .env:

TELESCOPE_ENABLED=false

Or restrict access via gate in TelescopeServiceProvider.


16. Final Mental Model (Very Important)

Remember this chain:

Browser
โ†’ Apache
โ†’ .htaccess
โ†’ public/index.php
โ†’ Laravel Router
โ†’ Telescope Routes

If any one layer breaks, Telescope fails.

In your case:

  • .htaccess was empty
  • Apache never reached Laravel
  • 404 was expected

17. What You Can Do Next (Recommended)

Now that Telescope works, you can:

  • Identify slow database queries
  • Optimize API endpoints
  • Monitor job execution time
  • Track errors across microservices
  • Combine with Laravel Debugbar and MySQL slow query logs
Post Views: 350
  • how to setup Laravel Telescope
  • Laravel Telescope
  • Laravel Telescope in laravel project
  • Setting Up Laravel Telescope Correctly
Subscribe
Login
Notify of
guest
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
digital banking
digital banking
2 months ago

Ahaa, its nice dialogue about this paragraph
here at this weblog, I have read all that,
so at this time me also commenting here.

0
Reply
wpdiscuz   wpDiscuz
  • Certified AIOps Engineer: The Complete Career Path and Certification Guide
  • How to Rename Apache Virtual Host Files Safely (Step-by-Step Guide for Linux)
  • AIOps Foundation Certification: Everything You Need to Know to Get Certified
  • DevOps to Certified Site Reliability Professional: A Senior Mentorโ€™s Guide
  • Certified Site Reliability Manager Training, Preparation, and Career Mapping
  • Certified Site Reliability Architect: The Complete Career Guide
  • What Is a VPN? A Complete Beginner-to-Advanced Tutorial
  • How to Install, Secure, and Tune MySQL 8.4 on Ubuntu 24.04 for Apache Event MPM and PHP-FPM
  • Complete Guide to Certified Site Reliability Engineer Career
  • Certified DevSecOps Professional Step by Step
  • Certified DevSecOps Manager: Complete Career Guide
  • Certified DevSecOps Engineer: Skills, Career Path and Certification Guide
  • Step-by-Step: Become a Certified DevSecOps Architect
  • Tuning PHP 8.3 for Apache Event MPM and PHP-FPM on Ubuntu: A Complete Step-by-Step Production Guide
  • Complete Step-by-Step Guide to Configure Apache Event MPM, Create index.php, Set Up VirtualHost, and Fix Ubuntu Default Page
  • Convert XAMPP Apache to Event MPM + System PHP-FPM
  • The Gateway to System Observability Engineering (MOE)
  • How to Finetune Apache and Prove It Works: A Real-World Guide to Testing Performance, Concurrency, HTTP/2, Memory, CPU, and Security
  • Building a High-Performance Apache Event MPM + PHP-FPM + MariaDB Stack (Advanced Server Optimization Guide)
  • Master Infrastructure as Code: The Complete Hashicorp Terraform Associate Guide
  • Building a High-Performance Apache Server with Event MPM + PHP-FPM (Step-by-Step Guide)
  • Is XAMPP Safer for Production Than Using Apache and PHP as Root? 2026 Practical Guide
  • Unlock Cloud Security Expertise with Certified Kubernetes Security Specialist (CKS)
  • How to Fix wpDiscuz Not Replacing Default WordPress Comments in Block Themes
  • Complete Guide to Certified Kubernetes Application Developer Certification
  • Overview of Certified Kubernetes Administrator (CKA) Certification
  • How to Install and Configure XAMPP on Ubuntu 24 Server (Latest Version โ€“ 2026 Complete Guide)
  • Mastering the Google Cloud Professional DevOps Engineer
  • Mastering Azure Cloud Security: The AZ-500 Path
  • Why AZ-400 is Essential for Global Cloud Engineering Roles

Recent Comments

  1. digital banking on Complete Tutorial: Setting Up Laravel Telescope Correctly (Windows + XAMPP + Custom Domain)
  2. SAHIL DHINGRA on How to Uninstall Xampp from your machine when it is not visible in Control panel programs & Feature ?
  3. Abhishek on MySQL: List of Comprehensive List of approach to secure MySQL servers.
  4. Kristina on Best practices to followed in .httacess to avoid DDOS attack?
  5. Roshan Jha on Git all Commands

Archives

  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022

Categories

  • Ai
  • AI Blogging
  • AiOps
  • ajax
  • Android Studio
  • Antimalware
  • Antivirus
  • Apache
  • Api
  • API Security
  • Api Testing
  • APK
  • Aws
  • Bike Rental Services
  • ChatGPT
  • Code Linting
  • Composer
  • cPanel
  • Cyber Threat Intelligence
  • Cybersecurity
  • Data Loss Prevention
  • Database
  • dataops
  • Deception Technology
  • DeepSeek
  • Devops
  • DevSecOps
  • DevTools
  • Digital Asset Management
  • Digital Certificates
  • Docker
  • Drupal
  • emulator
  • Encryption Tools
  • Endpoint Security Tools
  • Error
  • facebook
  • Firewalls
  • Flutter
  • git
  • GITHUB
  • Google Antigravity
  • Google play console
  • Google reCAPTCHA
  • Gradle
  • Guest posting
  • health and fitness
  • IDE
  • Identity and Access Management
  • Incident Response
  • Instagram
  • Intrusion Detection and Prevention Systems
  • jobs
  • Joomla
  • Keycloak
  • Laravel
  • Law News
  • Lawyer Discussion
  • Legal Advice
  • Linkedin
  • Linkedin Api
  • Linux
  • Livewire
  • Medical Tourism
  • MlOps
  • MobaXterm
  • Mobile Device Management
  • Multi-Factor Authentication
  • MySql
  • Network Traffic Analysis tools
  • Paytm
  • Penetration Testing
  • php
  • PHPMyAdmin
  • Pinterest Api
  • Quora
  • SAST
  • SecOps
  • Secure File Transfer Protocol
  • Security Analytics Tools
  • Security Auditing Tools
  • Security Information and Event Management
  • Seo
  • Server Management Tools
  • Single Sign-On
  • Site Reliability Engineering
  • soft 404
  • software
  • SuiteCRM
  • SysOps
  • Threat Model
  • Twitter
  • Twitter Api
  • ubuntu
  • Uncategorized
  • Virtual Host
  • Virtual Private Networks
  • VPNs
  • Vulnerability Assessment Tools
  • Web Application Firewalls
  • Windows Processor
  • Wordpress
  • WSL (Windows Subsystem for Linux)
  • X.com
  • Xampp
  • Youtube
©2026 DevSecOps Now!!! | WordPress Theme: EcoCoded
wpDiscuz