event-catalog / eventcatalog

An open source documentation tool to bring discoverability to your event-driven architectures
https://eventcatalog.dev
MIT License
1.66k stars 137 forks source link

Page redirects when deployed to Amplify temp site #594

Open anderson-marques opened 1 month ago

anderson-marques commented 1 month ago

For some reason, my application try to redirect to the homepageLink inside eventcatalog.config.js when deployed to a non-prod website. When omitted, it redirects to https://www.eventcatalog.dev/docs with message "Not Found" in the screen.

This was not happening on eventcatalog v1, probably was introduced by the new version.

otbe commented 1 month ago

I noticed the same and I think this is the default behaviour of astro.

homepageLink is used to configure https://docs.astro.build/en/reference/configuration-reference/#site And the redirect from / to /docs generates an index.html with this redirect.

bxRobert commented 1 month ago

I have the same issue. I changed the homepageLink put there is no redirect to /docs

Is this a problem because I deploy the dockerfile that uses httpd, with copy of the /dist folder. So no astro is used then, right? I will try out to change the configuration in httpd by adding a httpd-vhosts.conf

bxRobert commented 1 month ago

For me, astro was not the issue. It was missing httpd config. I deploy the dockerfile to my kubernetes container and there is only httpd that serves the /dist folder under /user/local/apache2/htdocs

<VirtualHost *:8080>
    ServerName xxx.xxx.xxxx.org
    DocumentRoot /usr/local/apache2/htdocs

    <Directory "/usr/local/apache2/htdocs">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    # Rewrite engine einschalten
    RewriteEngine On

    # Redirect von root zu /docs/
    RewriteRule ^/$ /docs/ [R=301,L]

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>