-1

I have a Drupal 10 website that is currently hosted on a sub domain (events.mydomain.com) and I need to move it to a path of the main domain (mydomain.com/events).

I would need to move the whole site to the /events path, so the CMS URL would be mydomain.com/events/user/login and all the pages on the site are served under /events/*

Drupal used to have a $base_url setting that I believe would allow me to do this but this setting was removed in Drupal 8.

The webserver is NGINX and there is another NGINX server in front of the Drupal web server with a reverse proxy that handles the incoming network requests and will send any URLs starting with /events to the Drupal web server. For example, mydomain.com/about-us will be routed to a non-Drupal website by the reverse proxy and mydomain.com/events/contact-us will be routed to the Drupal website.

How can I achieve this?

1

1 Answer 1

0

You can use the server configuration as below (understanding purposes only):

server {
    listen 80 default_server;

    server_name 1.2.3.4;

    location / {
        return 410;  # Default root of site won't exist.
    }

    location /events/ {
        alias /var/www/yourdrupalfolder;
        try_files $uri $uri/ =404;

        # any additional configuration for non-static content
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.