I'm seeing Welcome to nginx! Is that considered successful installation?

@jang430 There is no need to add any extension to the hosts file. I don’t know about creating the config folder but both the hosts and in-vhost.conf files can be anywhere as far I know, as long as the path mappings are accurate in the YAML file. Ideally they are located in your Invoice Ninja docker config folder, same place where your YAML file is.

I believe in5.localhost is fine for your hostname. Should be the same as in the YAML file.

Just as a reference, this is what the relevant sections look like in the docker manifest that I used to bring up the container:

services:
  server:
    image: nginx
    restart: always
    env_file: env
    volumes:
      - .in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
      - ./public:/var/www/app/public:ro

  app:
    image: invoiceninja/invoiceninja:latest
    env_file: env
    restart: always
    volumes:
      - .hosts:/etc/hosts:ro
      - ./public:/var/www/app/public:rw,delegated
      - ./storage:/var/www/app/storage:rw,delegated

I couldn’t upload the in-vhost.conf file as it’s not allowed in the forum but here’s what’s in it:

server {
    listen 80 default_server;
    server_name _;

    client_max_body_size 100M;

    root /var/www/app/public/;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass app:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }
}

Please note I am not an expert in any of this, just trying to help you :slight_smile:

1 Like

@Ph03n1ks , Thank you very much :grinning: With your suggestions for host and in-vhost.conf file, it finally worked!!!

Athough, it puzzles me why I have to put in my own hosts file and have to copy in-vhost.conf from you.

I’m glad I could help. Enjoy! :slight_smile: