Apache configuration for Neos Backend

Hello Neos community!

I need some help regarding the configuration for a multi-domain setup with Neos & Apache - maybe someone can push me in the right direction?

My (local) Neos CMS is working fine with my 2 defined sites/domains:

  • http://domain_a.test
  • http://domain_b.test

I can access the Neos Backend at http://domain_a.test/neos or http://domain_b.test/neos without any problems.

Now i would like to have a single Neos Backend entry point for all Neos Sites - is this possible?


Thanks in advance for any help :wink:

Shameless bump :innocent: :wink:

Hi Fly,

What do you mean by that, i.e. what do you want to achieve?

You can always configure a separate domain for any given site via the Sites management module.
But a domain always have to map to one active site

Hello @bwaidelich! Thanks for your answer.

I think this answers my question.

My idea was the following:

cms.company-domain.tld → should only show the Neos Login. This Neos instance has two defined Sites each with there own domainname eg. site_1.ltd and site_2.ltd.

I have this setup already installed and working. But I thought my editors would find it more convenient to only have one central place to login.

Right now the content from site_1.ltd is shown on the subdomain cms.company-domain.ltd. Right now I can login to Neos from 3 different places:

I hope this makes any sense :thinking:

I tried to make a .htaccess rewrite from
cms.company-domain.tld to → cms.company-domain.tld/neos but this didn’t work.

In that case you could mark the response as solution so the topic is considered “closed”.

Yes, thanks for the clarification.
But: Which site would be active if you used that cms.company-domain.tld domain? (a site needs to be active in order to display the correct page tree etc).

Why not?

This is my Apache vHost configuration.

<VirtualHost *:80>
    DocumentRoot "/path/to/my/neos/web"
    ServerName site_1.tld

<VirtualHost *:80>
    DocumentRoot "/path/to/my/neos/web"
    ServerName site_2.tld

<VirtualHost *:80>
    DocumentRoot "/path/to/my/neos/web"
    ServerName cms.domain_1.tld
    LogLevel info rewrite:trace5

When I try to add this rewrite to my Web/.htaccess

RewriteCond %{HTTP_HOST} ^cms.domain_1.tld$ [NC]
RewriteRule ^(.*)$ http://cms.domain_1.tld/neos/ [L]

and connect to the website via curl --verbose --head --location http://cms.domain_1.tld

I get the following 302 Found output. (The browser shows a redirect error.)

* Connection #0 to host cms.domain_1.tld left intact
* Issue another request to this URL: 'http://cms.domain_1.tld/neos/'
* Found bundle for host: 0x6000018c40c0 [serially]
* Can not multiplex, even if we wanted to
* Re-using existing connection #0 with host cms.domain_1.tld
> HEAD /neos/ HTTP/1.1
> Host: cms.domain_1.tld
> User-Agent: curl/8.1.2
> Accept: */*
< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Date: Fri, 23 Feb 2024 23:50:13 GMT
Date: Fri, 23 Feb 2024 23:50:13 GMT
< Server: Apache/2.4.58 (Unix) PHP/8.1.27
Server: Apache/2.4.58 (Unix) PHP/8.1.27
< Location: http://cms.domain_1.tld/neos/
Location: http://cms.domain_1.tld/neos/
< Content-Type: text/html; charset=iso-8859-1
Content-Type: text/html; charset=iso-8859-1

It looks like the rewrite works. Maybe something else like CSRF token from Neos is the problem?!