Can i use traefik without a web server?

Hello. I'm new at traefik. Before, i used to use apache2 to create a virtual host configuration files for my services (websites, web services,...) before deploying them . Now, i decide to move to traefik. But there is something i don't understand:

  • When i want to publish a website project on my server with traefik (docker), do i need to create an apache configuration file (for the website) again before creating my docker service?

I have followed lot of tutoriels and in most of them, they ask to give the hostname and the port of the service in docker with labels. But if there is no apache2 virtual host file, will it works?

I'm using traefik 1.7. Without creating apache2 configuration file, i can deploy an html web site with traefik by using httpd:alpine image. But when i try it with php websites , i have error with fonctions require_once or include.

docker-compose file:

version: '3'
    image: traefik:alpine
    command: --api --docker
     #--docker --docker.domain=traefik.local.lan
      - 80:80
      - 8080:8080
       - /var/run/docker.sock:/var/run/docker.sock
       - /etc/apt/traefik/traefik.toml:/etc/apt/traefik/traefik.toml
    image: php:7.3-apache
    container_name: website
      - traefik.frontend.rule=Host:phpsite.local.lan
      - traefik.port=80
      - traefik.enable=true
      -  ${PWD}/webapp:/var/www/html

In this example i have a php website in ${PWD}/webapp/. When i access http://phpsite.local.lan, i have error :

Fatal error: require_once(): Failed opening required '/var/www/html/loader.php (include_path='.:/usr/local/lib/php') in /var/www/html/index.php on line 11

But when i change php website to html website content, it works well