0

I have a Symfony3 installation on a server and I need to access the web files through the IP/game address.

So I created my "game" symfony folder with everything in it, and for now if I want to see my web content I need to add /web/app.php (or app_dev.php, nvm), which is logical.

So here is my question : How can I access my app.php (or app_dev.php) just by IP/game and not IP/game/web/app.php (or app_dev.php).

I can't configure any vhost to define a DocumentRoot so I think I have to use an htaccess but all my tests actually have failed :(

Thank you for your help and have a nice day !

Unyxos
  • 77
  • 1
  • 11
  • You should be able to use the default server configuration, see [the docs](http://symfony.com/doc/current/setup/web_server_configuration.html) – mickadoo Feb 15 '17 at 11:24
  • Possible duplicate of https://stackoverflow.com/questions/31426989/how-can-i-deploy-symfony-in-a-subdirectory – flxPeters Feb 15 '17 at 12:09

1 Answers1

0

The only way for this to work is always by accessing ( IP or hostname )/( app_dev.php for dev, nothing for prod )/routes

If you want to access dev environment you will need to use app_dev.php after hostname / IP. Everything after that is not related to file structure but with routing specified in configuration of Symfony application ( at least by default web server configuration which is provided on Symfony website ).

Jacek Lawniczak
  • 256
  • 1
  • 5