Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
Using the same codebase on two sites using Symfony but restricting one site to a very strict area

I have built a site on Symfony 4.4, let's call it redwidgets.com. Now as part of this site we have a feature we want to allow other companies to use, however we don't want them to know it's part of redwidgets.com.

I have built a page on www.redwidgets.com/stock-lookup that I have used a different template for so it's all unbranded etc. And using a ServerAlias in Apache I can see this at www.genericwidgets.com/stock-loopup

However I need to block people on www.genericwidets.com from going to other sections of the site and seeing it's part of redwidgets.com, so I would like it if they try to access the root then they'll just get a generic page.

I did think of maybe there is a way using security.yaml to identify the domain being called and restrict based on that but haven't been able to work out if that's possible.

I did think of just hosting this page in a separate site, but I am very unsure how the same database can be shared between the sites, would you have to duplicate Entities and code etc, that would sound very annoying. It can't just be separate as redwidgets.com makes large use of the relevant entities.

Currently using Symfony 4.4, Apache 2.4

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!