Tory Lanez is going to be spending a lot more time inside -- a judge just placed him under house arrest until his trial against Megan Thee Stallion begins ... and it all stems from an alleged incident with August Alsina.
The order came down Wednesday during a court hearing in L.A. ... where it was ruled that Tory needs to be on lockdown until November 28 -- the start of the trial -- as a result of accusations he beat the crap out of Alsina in Chicago in September.
Prosecutors argued TL deserved to be remanded into custody because -- in their eyes -- he'd violated the conditions of his bail in the Meg case. They say he continues to pose a threat to public safety and that monetary bail alone wasn't enough of a deterrent.
Tory's attorney, Shawn Holley, pushed back, noting ... no charges had been filed in the Alsina case, and there were only allegations. As we reported, Alsina took to social media to allege Tory had sucker punched him, with bloody photos to boot -- this after he'd apparently been snubbed by the singer in passing earlier in the day.
The judge ended up splitting the difference, ordering Tory be confined to his home with a GPS ankle monitor beginning Friday.