Summer Sale! All accounts are 50% off this week.

catalin12's avatar

[Telescope] TELESCOPE_DOMAIN not working as intended #1140

I barely installed this in my local environment. The URL of my project is http://localhost/project/public/. When I set the TELESCOPE_DOMAIN to localhost/project/public it does not work and I am unable to access /telescope (getting a 404 error). If I remove this line from my .env, I can go to http://localhost/project/public/telescope but if I click on any links, I go to http://localhost/telescope/...

0 likes
6 replies
Sinnbeck's avatar

Why is /public part of your url? It shouldnt be. The root should be inside the public directory, but the public directory shouldnt be part of the url.

What are you using to run your server?

catalin12's avatar

@Sinnbeck wamp, I am running on my local machine which is running on windows. "public" is part of my URL because I have multiple laravel projects that I must access simultaneously inside my www folder.

amitshahc's avatar

Hi, I configured the telescope as subdomain monitor.mydomain.test by following below steps

  • update config/telescope.php
'domain' => env('TELESCOPE_DOMAIN', 'monitor.mydomain.test'),
'path' => env('TELESCOPE_PATH', 'telescope'),
  • Added Virtual host
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "C:/laragon/www/mydomain"
    ServerName monitor.mydomain.test
    ErrorLog "logs/monitor.com-error.log"
    CustomLog "logs/monitor.com-access.log" common
</VirtualHost>
  • Added windows hosts entry
127.0.0.1      monitor.mydomain.test  #laragon magic! 

But now I can access the telescope UI via the url: http://monitor.mydomain.test/telescope I want to access it directly from http://monitor.mydomain.test/ without the .../telescope path appended behind.

i tried setting this to null not working

'path' => env('TELESCOPE_PATH', null),

Please or to participate in this conversation.