• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Enable Xdebug for Subdomain Only?

Username33

New Pleskian
Server operating system version
AlmaLinux 9.5
Plesk version and microupdate number
18.0.68 Update #2
Hi everyone,

I have a domain – let’s call it example.com – with a subdomain dev.example.com. I’m trying to figure out if it’s possible to enable Xdebug only for the subdomain.

I’ve added the following configuration under the “Additional directives” section for dev.example.com:

[Xdebug]
zend_extension=xdebug.so
xdebug.start_with_request=yes
; etc.

However, Xdebug doesn’t seem to be working.
Any ideas on what I might be missing?

Thanks in advance!
 
Yes, switch it to a dedicated PHP handler. Also make sure that xdebug is enabled in Tools & Settings > PHP > Dedicated PHP handler or those directives won't do anything. After adding the directives, restart the dedicated handler service.
 
Thanks for the help! I’ve now managed to get Xdebug working for the subdomain only.

What worked was setting the subdomain to use a Dedicated FPM application, adding the Xdebug config under Additional directives, and then restarting the dedicated handler service.

I had also tried enabling Xdebug under Tools & Settings > PHP > Dedicated PHP handler, but that ended up enabling it for the non-dedicated handler too – which I didn’t want – so I left it disabled there and just stuck with the subdomain-specific setup.

Appreciate the input – this helped a lot!
 
Back
Top