app not accessible
martinerko
HOBBYOP

a year ago

Hi, I have deployed simple static website served using Caddy but the domain assigned is returning 404:

I have tested caddy command locally and it works fine.

Can you please advise what is wrong?

Solved$10 Bounty

Pinned Solution

idiegea21
HOBBY

a year ago

Your Caddy server is running but not finding files to serve at the root path (/). The issue is likely with:

  1. Incorrect root directory path in your Caddyfile
  2. Railway's working directory vs your file structure
  3. Caddyfile syntax issues can you provide me with your Your current Caddyfile (complete file) & Your monorepo directory structure

4 Replies

echohack
EMPLOYEE

a year ago

Heya,

Your app is live and serving traffic but you don't have an endpoint for / configured.

```

Starting Container

using provided configuration

Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies

admin endpoint disabled

automatic HTTPS is completely disabled for server

started background certificate maintenance

cleaning storage unit

finished cleaning storage units

server running

serving initial configuration

handled request

handled request

handled request

handled request

handled request

```

You can see it's handling requests, there's just nothing to serve.

You'll need to configure your application to serve something at the root.


Status changed to Awaiting User Response Railway 12 months ago


echohack

Heya, Your app is live and serving traffic but you don't have an endpoint for `/` configured. \`\`\` Starting Container using provided configuration Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies admin endpoint disabled automatic HTTPS is completely disabled for server started background certificate maintenance cleaning storage unit finished cleaning storage units server running serving initial configuration handled request handled request handled request handled request handled request \`\`\` You can see it's handling requests, there's just nothing to serve. You'll need to configure your application to serve something at the root.

martinerko
HOBBYOP

a year ago

Hi @echohack,

here is a snippet from my Caddyfile,

I previously had it as

`root * public`

now changed to full path in my monorepo

`root * apps/some-project-folder/public`

none of that works.

Attachments


Status changed to Awaiting Railway Response Railway 12 months ago


a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 12 months ago


martinerko
HOBBYOP

a year ago

any guide you can point me out to show how to deal with monorepos and Caddy in railway?


idiegea21
HOBBY

a year ago

Your Caddy server is running but not finding files to serve at the root path (/). The issue is likely with:

  1. Incorrect root directory path in your Caddyfile
  2. Railway's working directory vs your file structure
  3. Caddyfile syntax issues can you provide me with your Your current Caddyfile (complete file) & Your monorepo directory structure

Status changed to Solved chandrika 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...