0

The mGSV folder contains php files and folders with images, JavaScripts, CSS, Php

ARCHITECTURE.txt    Install         base_mgsv.php       history.php     index.php       mgsv.php        scripts         tmp
Arial.ttf       README          contact.php     html            js          sample_annotation.txt   software.php        tutorial.php
INSTALLATION        about.php       css         img         lib         sample_synteny.txt  summary.php     ws

However, images do not get loaded. What did I miss in the following nginx.conf file? The complete project can be found on GitHub

server {
    listen  80;

    root /usr/share/nginx/html/;
    index index.php index.html index.html;

    server_name localhost;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location /mGSV {
        try_files $uri /index.php$is_args$args;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass phpfpm:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

And my docker-compose.yml file looks like this:

nginx:
    image: nginx
    restart: always
    ports:
        - "80:80"
    links:
        - phpfpm
        - db
    volumes:    
        - ./logs/nginx-error.log:/var/log/nginx/error.log
        - ./logs/nginx-access.log:/var/log/nginx/access.log

        - ./nginx/default:/etc/nginx/conf.d/default.conf

phpfpm:
    build: php5-fpm
    restart: always
    ports:
        - "9000:9000"
    links:
        - db
    volumes:
        - ./mGSV:/usr/share/nginx/html

db:
  image: mariadb
  restart: always
  environment:
    - MYSQL_ROOT_PASSWORD=admin
    - MYSQL_DATABASE=mgsv
    - MYSQL_USER=mgsv_user
    - MYSQL_PASSWORD=mgsvpass
  ports:
    - "3306:3306"
  volumes:
    - ./mysql/:/docker-entrypoint-initdb.d

phpmyadmin:
  image: phpmyadmin/phpmyadmin
  restart: always
  links:
    - db
  ports:
    - 8183:80
  environment:
    PMA_USER: root
    PMA_PASSWORD: admin
    PMA_ARBITRARY: 1

Thank you in advance

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.